Refactor Routes controller