Rewrote events.  Again!.  Based on node-ffi.