Use separate class for output formatting