Improve types and tags relationship.