More tests

Added a standalone AggregationValueContainer for testing, mock not
really practical in this case, added a few tests and fix many bugs