Clean up code in json_to_sql.js