Did 1, 2, and 3, didn't do 3.1 because it would just add unneeded code (storing aggregator in struct, then closing from `close()`).