Properly scoped click handling