Rewrite autosave to allow to be compatible with other server implementations

Almost compatible with cauldron, but still have to fill in the field
names