Update userscript.js

Cleaning things up, making things make more sense!

Also, as a side-effect, this has also made things more "pluginable"