Refactoring osprey router

WIP