Cleaned up grid controller.