[WIP] Refactoring router