added support for mongoengine with the updated code

Also I fixed an bug when doing inheritance with mongoengine the module name was erroneous.