Update namespace.js

Consistently return the namespace object.