moved image downloading code, and tcp error code into nuvoapiclient class