Convert tab->spaces and remove trailing whitespace