Backport M2.7 version to M2.5 and remove features that are not supported in M2.5