Refactored output