Reorganization of module creation, saving, and closing.