Refactor to main route