Sorting out directory structure for stables