Small API fixes:

_serialize and _unserialize methods