Refactoing dir structures