Code clean up on policies in angular