Can now serialize and deserialize from database.