Adding better maintenance mode functionality.