restructures files