More canvas.class.js refactoring