Refactor Router