Add function to remove trailing whitespace on save