Port of OpenCTM to JavaScript