Refactoring shell