Update of define and createAbstractGrid function in grid.js