Removed fragmented code from class.catgallery.php