Cleanup of the grammar