Improve API for custom match functions
Fix lint/style in tests