Unifies NodeRef and ValueRef, since they are extremely similar.
Remove distracting try/except ImportError.