Cleanup of generated html and better scoping of the javascript caption script