convert spaces to tabs, fix some whitespace