added tests for the policies
clean up tests and jshint