Rewrite of guidelines.js