Fix compilation error in Grid instanciation.
Fix memory leaks with tiles.