Global refactoring.
Mongo integration pre stage