dependency injection for templates
cleaned up remaining calls to param()
pass $app to the get/post view methods