handling message send errors
added typing notification function
Refactoring