Added mongo database interaction.