Fixed a routing bug.
Route manager finished, need some refactoring and tests.