Replace depreacted constants/functions