JavaScript Compiler Cleanup

* Improves usefulness of `extend` utility
* Properly use the namespace in the JavaScript compiler output
* Update `setupOptions` to return an object, which is much simpler to work with in extended implementations