Polish code. Dont require json for the entire script, just for print_json.