Making the app more MVC for ease of refactoring
Refactoring