remove copy function
Switch to JS code injection paradigm

I was working on MutationObservers earlier, but haven't gotten those to
work.

If we ever decide to switch, the branch is available, but now we should
use js code injection.
Stylistc corrections, change n_build function def

N_build can be a toplevel declaration, instead just taking in "newtext"
as an argument.

Minor stylistic corrections (js-beautify), semicolons, etc.