added ref-counted api

fixes #4
removed old stuff
0.6.2