Make each class serializable.