Added messages functionality, json