Changed routing, some refactoring