more cleanups in python code