Finished the foundation function of the message archive  core data