Did some refactoring
Now using mongodb as data store