Basic .var functionality, solve undo stack issues