Escape, json and xslt refactored (+specs)