PEP8 fixes and fixed edit_part.