Cleaned up client.py a bit.