Refactor the lightbox module to be a static function object