Added serialization and deserialization of algorithms object.