Refactoring as MVC app