fix for a deserialization bug which was re-enabling serialization too soon.
added quite a bit of logging (note: this needs to be made optional)
a minor amount of non-behavior-changing code clean up