Move policies JS to a more betterer place