Refactored to make MongoDB-related functionality into Options; the app now copes with a disabled MongoDB database
Fixed tests to work with optionised MongoDB code