Refactorying output