MongoDB functions updated, restart function added