Whoops.
Refactor to allow custom matching functions.