heavily refactored Tag to be type safe and extendable: every tag has now one type entry and one own class, nothing else.