Remove many deprecation warnings