Module exports a function rather than a singleton now.

Makes for nicer code...