Refactored controllerse and updated edit, routes, and application templates