Fix a number of warning and deprecation messages