Initial lightbox refactoring