semantic cleanup