Revising order storage of JSON; also PEP8 fixes