Compile and deprecation fixes