Made the task for the timer an inner class of the controller instead of its own class.