Optimize structure of files