The new matching code is buggy shit and deserves to be sent to orbit and destroyed, but somehow works (note: MUST be refactored and better tested)