Merge records

Implementation of #24 . 
7532939 also fixes verification not handling properly WebSocket protocol