Refactored all external modules to use require.