Remove lots of deprecation warnings