Added calling of modules' shutdown command.

Consolidated module loading to be shared between setup, configure,
and shutdown modules calls.