Unify different tag search routines to one, update test, update comments