Restructure JS and fix zoomable images.