added MessagesManager which manipulates 'messages' collection.