Changes to comments, naming and code to increase clarity of the code and explain better what it does and why. No change in behavior. Change-Id: I998fcfd620c2ee737618c3ab8f41fb6dfdd2c99a