Directories and shell handling refactoring in progress (:bomb:) (1)