minor cleanups
cleanups
add doc
fix several bugs and send out namespace event when item is added