Refactor static_canvas.class.js