Make entities serializable