reassemble Gallery so that it uses vanilla JS, no jQuery