Refactors some of the user-typing notification code