Shuffled some code and added method stubs in controller.