Removed clearCanvas() as unnecessary.