Shell refactor