Optimized the onClickListener for the ImageViews.