Moving the grid creation functions to the browser js