moving http stuff into a client.. and cleaning up some json parsing.