converting tabs to spaces and cleaning up newlines