Removed some duplicate code in countMatches
Ran pylint a thousand times and cleaned the code. Huzzah.