Reorganized main module