Tags refactor part 1

This is the first part of a refactor of the names package to introduce a Tag interface type, and real types that represent different types of Tag implementations.