Preparing for serialization