Added raw data cleanup functionality