Add javascript validation to app creation page, refactor controller logic into helper methods