Added canvas resizing.
Canvas resizes properly and background is drawn.
Fixed panel.