Mongobackend v1

This is my first pull request ever. I made sure to put all my changes on a branch :)

There are a lot of changes. Do you think I used the right approach?

//Peter