Reverted module patterns to constructor pattern. Added jsdoc.