Safely parse responses.

Also, a bit of linting.