refactored tests and added new route tests