finished implementing compaction (still need to test); all pre-existing tests still pass