Cleaned up tests a bit more, did some general cleanup on patternMatch