some logic for tags and a first search function. tag logic is to replace membership. More thoughts and use of tagmode/singletonmode are required