Add missing parameter: $load_modules
Style fixes
Fix ordering issues
Remove redundant cruft
Switch to a more modular approach to load modules