Restructuring and main module