Fixed the huge bug that broke everything and improved matching (I think)