since we rely on the dom, place scripts at the bottom
improved thumpanel + handle image width + bugfixes