Implemented smarter handling of type tuples.