Restructures files