Fixed out of bounds error - started implementing scoped symboltables