Bank of America has agreed to settle a class action lawsuit brought against Countrywide Financial, its troubled mortgage lending arm. The settlement came as Bank of America announced its first quarter income, with profits soaring but failing to meet analysts' expectations.