Cleaning up unread counting. (#460)