restructured initialization of routes