Refine directory structure