added app controller, updated build functions