This will cut client.py down from ~4k to ~1k SLOC and also makes the whole project tidier and more organized.