Updates MongoDB code to save analysis submission to database