WIP: router refactor