Fix up some style and deprecation warnings