Minor refactor in Directory