Added variable grid optimizations