Use createCanvasElement instead of createElement. Fix indentations.