Fixes tests and adds route tests.