Added example of policy scoping and fixed tests