removing trailing spaces, changing spaces to tabs