I don't see the point of the whole mechanism for saving the old state (and I don't think you are using it.