Make entities serializable.