More sophisticated handle on query node.
Added debug shape production method.