Refactored long methods for setting up click listeners.