slight refactor of tag type editing