Refactor route