Move click event into it's own function
#5