Better aggregation support

Added support and tests for aggregation operations.
example of whitespace being out?