remove extra whitespace and comments