cleanup
fixme++
implement node-side close and read