Refactor route helpers.