removed wgResponse as a global from sendHTTPResponse; chanded all calling functions; also fixed a few coding standards issues