Auto-update unread counts, a few optimizations, less debugging