Delete trailing whitespace on save
Write a better algorithm for removing trailing whitespace