refactored appending blocks to DOM

Now waiting till build the whole json grid, then append it to DOM.
Instead of adding the block inside cycles.