Code and test fixes

* Fixed enabling/disabling of module.
* Corrected lookup paths in tests.
* Added a failure message to MMDB_INFO if lookup fails.
* Simplified some of the code.