Merge ClientHook and API, put client stuff in client.py