Refactored the click listener around.