Remove trailing whitespace and commented-out code