Added accessors and serialize/deserialize methods.