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