Refactor output formatters