Refactor module loading into one script