Reduce scope of click handler