removed some unused variables, and fixed code in grouter for new IDs