JPMorgan and Wells aided by cost cuts and better housing market