Fixes forceSwapped to take new and old structure
Adds initial experimental support for undo/redo.