Switched from using mongode driver to using mongoose ODM for database access