more python cleanups