MVC refactoring