Added minimal comments and fixed aggregate tests.