Fixed a bunch of javascript to work with the new layout

Enabled the image test page