Some clean up of old python stuff, and improvements