support for a function as a commands() section.
autopep8 python code
Manual pep8 fixes, and other bugfixes.
More style and bugfixes
tidying up some version code