Refactor with MVC