Clean up galleryGenerator.php