Fix #124: initial undo/redo state. Also tidy that area a bit (enum).