Module exports a function rather than a singleton now.

Makes for nicer code...
not sure I like prefixing variable with `_` in this way.  To me `_` denotes some kind of private variable (or in erlang a variable that isn't used).