various fixing: now higher order syntax works. extra support in ast.