naming conventions

origins and groups are correctly defined, and made room to include
groupids for node aggregation.

Added actual code to aggregation file.