Added typing functionality to chatbox.