Output refactor