Move loadExtensions to own module

Looking to make `main.js` much slimmer.