Moving tag logic out into a tag model