Implementation of some undos. Untested.