Made SemanticChecker state instance fields rather than function parameters.