Fixed example, added exports

Fixed an example, removed console.log statement, and added some exports for node module usage