client_api.py, formatter.py: refactoring giraffe/client