Update Grid.m

Cleanup and Bug fixes