Added support for unread messages
Removed some unnecessary console.logs