Refactored terminal again