Optimize innerContext looping

if the number is odd then we can simply append the odd number and carry on looping through the rest in intervals of two.