Refactored some of the grid code in the GridField class