Clear up many deprecation warnings