Getting rid of a few deprecation warnings