Added scope building to the parser