Reorganized for module use