Extract class XS.Code into code.js from xs.js