Added support for nested scopes in the symbol table. Fixed potential memory leak in type.cpp due to uninitialised vector.