Restructured Main File