Finish refactor router