Fixed most functions in .ganga.py to work with Ganga6 and did some PEP8 neatening.