Improved mongodb lib
Generate entity API, WIP