Cleanup client utils

I split up `utils.py` into different files and placed them in a `utils/` directory. I also cleaned some lint errors in other parts of the client.