Reworked directory stuffs