Some refactoring, start of lightbox