order categories and images, and fix missing ref to javascript