Shell refactored