added some notes, and implements node-or-browser pattern. which is... awkward.