Refactor right hand side and symbol table