Added tests for TypePairs, fixes.