trim trailing blanks, remove some comments