js code wrapped to allow multiple grids
Revert "js code wrapped to allow multiple grids"

This reverts commit 67981be09d8dc5ef3f43e93e0645c0f6e4edbd33.