fixes lint errors and deprecation warrnings