Simplify the logic in TMatchState.
Merge pull request #74 from ahmedcharles/simplify

Simplify the logic in TMatchState.