Route refactoring for better DI