Serializeable support; slight api changes