The suit alleged that BP illegally released air pollutants by failing to adequately inspect, maintain, repair and properly operate thousands of pieces of equipment across the refinery as required by AQMD regulations. It was alleged that in some cases the violations were due to negligence, while in others the violations were knowingly and willfully committed by refinery officials.[67] In 2005, a settlement was reached under which BP agreed to pay $25 million in cash penalties and $6 million in past emissions fees, while spending $20 million on environmental improvements at the refinery and $30 million on community programs focused on asthma diagnosis and treatment.[68]