Made the abstract Document class serializable.