Finish routing and refactor tests