Finished the infrastructure for external modules.