Added adaptative behavior to the grid and fixed a bug where the buffer for the cell table was allocated too small leading to a crash.