Finished first refactoring to MVC