Python client cleanup and improvements.