typing error
moved to mongoengine
code cleanup