Simplified contact matching logic.
Merge branch 'dev' into test