Maximizing energy savings and minimizing costs