Refactoring
 - move create first undo stack to create History.
 - extract `afterCommand` from triggerOnChange, recordUndo
 -