Refactored sendchattextasynctask to processstextchatpacket.

Also added small functionalities to codebase.
Merged with current code.