Dir improvement
Small refactor