grid code cleanup and refactoring in progress
Merge remote-tracking branch 'origin/master'