remove trailing whitespaces
remove dead labels