more tests and routing fixes