Main app controller refactor to be DRYer