galleryLength - 1 for for
open correct image in gallery
better bounds for currentGalleryRef
better way to send data to lightbox
lazy add elements to gallery
small fixes and refactors