Refactored loading to get middleware module all hooked up again.
Got the CLI working again.