refactor Typesafe Aggregator examples and tests