Add stub for JSON; cleanup xml.js