Fix clang warnings
Much cleaner HardCodedModuleFactory.