Updated the API to give the user control over when the model is generated.
Updated test for extension to node's require.
Renamed sessionId to _sessionid to better conform to the spec.