Thanks. I'll have to look into it, as quite a bit of stuff happens every tick (but then there aren't too many objects). My own idea was to basically have dynamic arrays, same as the ones you use to save out files. And just load those back when an undo is called.
But I need to fix the loading first - something is missing there when you try and load another thing after the first load (perhaps I need to clear the Array object or the AJAX one or something like that).