Implement 'dirty bit' logic

Also do some other changes important for this---see the commit messages for the first two commits
I wasn't *necessarily* planning on actually updating that just yet; as I pointed out elsewhere, we had a whole module lying around that wasn't being used.

Also, @gsilvis, you misspelled succeed.