cleaned up app controller