Lightbox and more or less rework of some functions