convert routes to rails like way
some refactoring