Major refactoring of edit code, now more fine-grained updates/queries of objects and less state kept in client
Fixes #13