added trailing whitespace highlighting and removal
changed perltidy function