Clean up credit cost calculations (hopefully more understandable now).