Added messages api
Cleanup and updated docs for api redesigned