add initial put implementation
support debugging, fix test.c mem leak
Merge branch 'put'