Moved to individual js files, added auto-canvas resizing.