PEP8 cleanup and minor modifications.