Rework collections API
Fix retrieving of raw message from buffer