pigment rewrite rules and demo xml cleanup