Remove 'type' attribute from tags; rework tag definitions.