memory wasteful undo button

also ugly brown drawing fix, js is starting to look like a mess