Fixed issue with mongoose-auto-increment and various other glitches.