refactors controllers, now have to get to the bottom of onload functions, etc