Added gallery functionality.