Refactor Shell Editor