Updated to work as an add-on.

Adds the ability to initialize the module based on environment variables.