Added where clause to findOne to account for deletedFlag, updated populate function to also include deletedFlag