All serialization routines have been tested and fixed where needed, fixed some sloppy copy/paste errors.