Merged all pre pointer update changes from 4.0 into 5.0 branch