Remove deprecated calls and suppress warnings which can't be fixed