Removed loop causing Chrome to hang. Added code to make the grid resize with the window.