Cleanup for adjusting viewport size and centering canvas. Remove dependence upon jQuery syntax.