Serialize OCTGistEdit

This builds on and replaces #165.