removing empty entity and remark lists