Refactored entire application to conform to MVC.