Create proper routes, refactor tests