More unit tests and fixes for change aggregation.