python script cleanup
fixes