Changing from `NN.prototype =` to `NN.prototype.funcname = ...` isn't a change I want to make in this patch.  If only because this makes the diff busy and it's really hard to tell what the real changes are in this PR. Also this is a style decision I made for this library. People use the `prototype.func` pattern, but that wasn't my choice for this library.