Refactored into MVC app