fixing various things (mainly related to commmonjs misunderstandings) --...

... see comments

Seems like you are a bit confused about how commonJS `require` is supposed to work as I saw no `exports` or `module.exports` anywhere.

These fixes should help you get on the right track.
Please merge ASAP so I can delete my fork.

Test by running `node test/foo.js`.
again, you don't *need* to export something, it's completely optional