Formatted output and sort