a lot of small improvements towards mongoDB backend