It should work on OSX now but left some memory leaks