Use iterables if possible, cleanup, close json file