Partially implements issue #1

At this point, there's still no way to differentiate between variables of the same name in different patterns. Have to think about how to approach that.
Fix inference logic to stop when the root is inferred.
Added new regression tests for pattern matching.