Cleaned up some output formatting and parameter handling.