Clean up grid directives