Handle modules differently and add type
Optionally free up args for other functions
Write stubs
Merge pull request #141 from gzip/master

Generate JS stubs