refactor Eduardo's patch into function; write test.
go lint
Issue 35: handle empty responses
verbose debugging comment