Finished RebuildBlock plus test suite

Also added some touchups and made things look prettier. More comments,
etc.