Cleanup of code, works in os, abandons WIP uisng libuv