Cleaned up canvas.js