tab to spaces, remove trailing spaces