finished modularization of injected code - all nice and OO now.

i would be shocked if there were no regressions. i'm checking in
before complete testing because the change is so huge and i want to
push to github so there's a backup copy somewhere.
i tried to use Object.create, but the properties descriptor was
not working right, so i fell back to assigning __proto__. sigh.