Support matching objects

Fixes #2.