General formatting
Fixed the display: none bug
Added missing else condition for canvasSize
updated test page