Refactored gallery to loop through an array of image paths instead of just files indexed by number.