fix comment string syntax, trim trailing whitespace