Code for editing thread tags.