Fix breakage and deprecations