Embed the JS code in a namespace.

This should facilitate the integration in the main codebase.