remove tiny pub/sub
fix writeItems callback

and clean up debug