Update mongoose, tests/fixes for resolve and api