Updated the filtering to allow for ID and class name references.