ensuring that selector excludes text nodes, added versioning