Wipe out mongo module and move support functions generically to nucleus module