Datastructures

new pull-request with reworked aggregation structure and fix for the wrong-value 'bug'