Undo works

Also fixed a bug with file saving, increased maximum history entries in
memory, and began adding redo.