Restructure file