add support for nodes and nodelists as selectors, fix #26 and #23