restructures directories