Cleaned up output and main method