Midway between stuff
Integrated check for loop bounds

The check was integrated with new optimisation code. Now supports name, const , plus and minus expressions.
Removed old commented code

The previous loop bounds check code was commented and now it is removed.