Python script typo and clean up