Made model serializable