client.py cleanup