fix document reset (clear)
add command for reset tool
cleanup
update tests