Refactoring MVC components