* refactor policies component * add tests * cleanup * clean up * change trackBy to * change detetction