Variable track optimization

So instead of tracking at byte level, we can track at the size
of memory operation. This will reduce the execution time and memory overhead.