Adding more tests to routing layer, fixing bugs.