Fix errors with output formatting, etc.