Prepare routes and fix somes tests