Binary grid now uses realloc for resize.