Update doc for instancestate method; some PEP8 fixes