wrap everything inside a module pattern anonymous function so we're not filling up the global namespace, and add Node-style export ability