Refactoring to remove route