changed the way phrases are cleaned