Some output refactor