Merge "Making code more readable by removing global variable used for optimizations" into tm-qpr-dev