Removing the old mongodb classes

Removing the old mongodb classed and refactoring the model class code