lightbox refactor