JC-1740 Added validation for contacts. Added grouping of contacts by type.