move grid variables into global
Finish variables for table