Restructuring app to be more MVC-like