clean up the router and add model for groups.