Preliminary matchmaking

I don't know how well it works yet until more testing is done, but
matchmaking works now.