[lib] Encapsulate in a self-executing anonymous function.
Merge pull request #1 from mwbrooks/modularize

Encapsulate in a self-executing anonymous function.