Cleaned up module definitions and usage by exporting constructor function directly.