cleaned up code in ModuleDisplayGallery.php