Removed use of deprecated MongoDB APIs