spaces to tabs and some cleanup