Cleaning up matching (towards robust adding more statistical measures).