Some refactoring
Add tests for route inspection