Created my own shared_ptr on which the reference count can be manipulated.
refactored once more... now need to debug..
Writing C++ bindings for libuv is deeply unpleasant.