Bug fixes, new image profile

JS is fragile -- little or no type and syntax checking. Gotta be careful