Sort some lists in json output to make test case deterministic
typos / pep8
Add *~ to gitignore