Added comments and minor tweaks to compaction.