Fixing some bugs and adding more functions for WhatsApp protocol functionality