Modified message_db api to reduce chance for improper usage and added more documentation.