Refactored TypecheckState into SymbolTable
For modularity and reuse!!