Homework 2 - Refactoring, tidy up model and controller.