Removed that confusing  construct, which had been reduced to only the 'filter' function, and adding more logging.