Remove the function for taking the grid

Remove the function releaseGrid and change getGrid