removed wgOut as a needed global from sendHTTPResponse; changed all calling functions