Many small refactorings, including new uri schema implementation in router