Migrating CL.js to work with Firefox-JS (work-in-progress)