Refactor DOM rendering and copy/paste support

Allow pasting into the console via a hidden clipboard. Closes #36. 
:scissors: