Fix deprecation warnings. (also covert tabs to spaces).