separate click handlers from functions, edit styling and html