Refactoring appRoutes