restructuring of com/main