fixed TagsSpec and TODOs relating to tag handling code