Small optimalization.
Some name changes.
Removing some redundant conditions.
Removed getVarSmallerEqThen and replace it usages with getVarBetween.