Refactor routes and remove unused