pipelet.js, use query_tree_emit, query_tree_add, and query_tree_remove