Fix PEP8 violations

Line continuations correctly aligned with start of implied block.
Missing blank lines between fucntion definitions added.