Reducing electricity costs and energy consumption