Refactor routes for import