reorganized parts of the application for properly conform to a MVC pattern