trailing spaces deleted, routes refactoring