Doc save_rates and code cleanup