Refactor DOM rendering and copy/paste support

Allow pasting into the console via a hidden clipboard. Closes #36. 
What's the motivation for the timeout?