fixed several bugs in the symbol table search function
now variables and scoping is working