Update mongoose version and adapt classes.