Update to r4 - CM's squashed commits

Also, made required adjustments to IntelliActive and IntelliDemand so it works with CM's commits