Scoping has been implemented. Need to take care of gencode.