Improve debugging
Fix potential race condition with UI-driven syncing and activation
Add helper functions for searching