reorganize to follow more MVC conventions