formatting comment box and removing trailing whitespace