Clean up main class and show JSON and XML output