Using Batteries for Time-of-Use Rate Optimization