Added swipe functionality to gallery