Do we really want to create the boxes in the index page?   Wouldn't it be better to create them dynamically in the JS file?