refactored and fixed tests and schema to fit mongoengine