Patch Set 9: Looks good to me, but someone else must approve; IP review completed

>My remaining question is: is there a better place to put 

>this logic? Currently it is pretty much duplicated between 

>AddCommand and CommitCommand.