Reorganized the project using a more MVC approach