Updated for serialization.