Add JSON output, add some printing options