optimize dom elem creation by adding to document.body only after all
elements are done. refactor dom & pure js entity creation odes to own
funcs for clarity.