mostly optimized javascript by reusing html elements, and using document fragments to load all items at once to avoid multiple repaint / reflow