Pulled out module management into a ModuleProvider class.

Added XMMPServer constructor that takes a module provider