restructure routes and add group endpoints