More refactor in tag iterator, and tag implementation