fixed content type/length headers, moved back to listenTCP, added fixes for bad html