refinements to the K12 module
further optimization of the drawing logic during undo/redo move