Added support for output formatting.