Implements most of the tagging features.