Refactoring of symbol table and scope. Make a ScopeNode class