Refactor route initialization