add scope in function definition and hack arround special keywords such as do,insert used as function in pbx.