Completely rewrite match(es) API test cases

Fix test cases, minor edits elsewhere

Use event key instead of event itself

Use .put() correctly

Add ID

Fix key

Completely rewrite match(es) API test cases, minor edits elsewhere