(EmailAggregation) Added some tests, minor cleanup