Improving the code by implementing the 'View.OnClickListener' class.