Add a matches method and replace operator== implementation as described in issue #82