anchor.diff:  
     Future _pushViaUSB(ProgressMonitor monitor) {
       List<int> httpRequest;
  -    AndroidDevice device;
  -    bool canceled = false;
  -
  -    // Get the device
  -    return _fetchAndroidDevice().then((deviceResult) {
  -      device = deviceResult;
  -    }).then((_) {
  -      // Build the archive.
  -      return archiveContainer(appContainer, true);
  -    }).then((List<int> archivedData) {
  -      // Send the request for pushing the archive
  +    AndroidDevice _device;
  +
  +    // Build the archive.
  +    return archiveContainer(appContainer, true).then((List<int> archivedData) {
         monitor.worked(3);
         httpRequest = _buildHttpRequest('localhost', archivedData);
         monitor.worked(4);
   
         // Send this payload to the USB code.
  -      if (canceled) return null;
  -      return device.sendHttpRequest(httpRequest, 2424).timeout(
  +      return _fetchAndroidDevice();
  +    }).then((deviceResult) {
  +      _device = deviceResult;
  +
  +      return _device.sendHttpRequest(httpRequest, 2424).timeout(
             new Duration(minutes: 5), onTimeout: () {
               return new Future.error(
                   'Push timed out: Total time exceeds 5 minutes');
             });
       }).then((msg) {
  -      if (canceled) return null;
         monitor.worked(3);
         String resp = new String.fromCharCodes(msg);
         List<String> lines = resp.split('\r\n');
  
positive.code: 
        if (lines.first.contains('200')) {
          monitor.worked(2);
          return _getLaunchRequest(target, appContainer.project.name);
        } else {
          return new Future.error(lines.first);
        }
      });
    }
  
    Future _sendRequest(List<int> httpRequest, [String target]) {
      if (target == null) {
        return _fetchAndroidDevice().then((deviceResult) {
          return deviceResult.sendHttpRequest(httpRequest, 2424).timeout(
              new Duration(minutes: 5), onTimeout: () {
                return new Future.error(
                    'Push timed out: Total time exceeds 5 minutes');
              });
        });
      } else {
        TcpClient _client;
        return TcpClient.createClient(target, 2424).then((TcpClient client) {
          _client = client;
          _client.write(httpRequest);
          return _client.stream.timeout(new Duration(minutes: 1)).first;
        }).whenComplete(() {
          if (_client != null) {
            _client.dispose();
          }
        });
      }
    }
  
    /**
     * Launch an app with appId on given target address.  If target is
     * null, will be sent to USB device.
     */
    List<int> _getLaunchRequest(String appId, [String target = null]) {
      List<int> httpRequest = [];
      // Build the HTTP request headers.
      String header =
          'POST /launch HTTP/1.1\r\n'
          'User-Agent: Spark IDE\r\n';
      String body = "appId=$appId";
  
      httpRequest.addAll(header.codeUnits);
      httpRequest.addAll('Content-length: ${body.length}\r\n\r\n'.codeUnits);
      httpRequest.addAll(body.codeUnits);
  
      return httpRequest;
    }
  
    // Safe to call multiple times. It will open the device if it has not been opened yet.
  
negative.code:     });
    }
  
    List<int> _buildHttpRequest(String target, String path, {List<int> payload}) {
      List<int> httpRequest = [];
  
      // Build the HTTP request headers.
      String header =
          'POST /$path HTTP/1.1\r\n'
          'User-Agent: Spark IDE\r\n'
          'Host: ${target}:2424\r\n';
      List<int> body = [];
  
      if (payload != null) {
        body.addAll(payload);
      }
      httpRequest.addAll(header.codeUnits);
      httpRequest.addAll('Content-length: ${body.length}\r\n\r\n'.codeUnits);
      httpRequest.addAll(body);
  
      return httpRequest;
    }
  
    List<int> _buildPushRequest(String target, List<int> archivedData) {
      return _buildHttpRequest(target,
          "zippush?appId=${appContainer.project.name}&appType=chrome",
          payload: archivedData);
    }
  
    List<int> _buildLaunchRequest(String target) {
      return _buildHttpRequest(target,
          "launch?appId=${appContainer.project.name}");
    }
  
    Future _sendHttpPush(String target, ProgressMonitor monitor) {
      List<int> httpRequest;
      return archiveContainer(appContainer, true).then((List<int> archivedData) {
        monitor.worked(3);
        // TODO(ericarnold): Turn the request into a class
        _sendRequestTcp(target, _buildPushRequest(target, archivedData),
            monitor, keepOpen: true).then((TcpClient client) {
          /*%TRACE3*/ print("(4> 6/16/14): laycnh!"); // TRACE%
              return _sendRequestTcp(target,
                  _buildPushRequest(target, archivedData), monitor,
                  client:client);
            });
      });
    }
  
    Future<TcpClient> _sendRequestTcp(String target, List<int> httpRequest,
                           ProgressMonitor monitor,
                           {TcpClient client: null, keepOpen: false}) {
      Future _createClient() {
        if (client == null) {
          return TcpClient.createClient(target, 2424).then((TcpClient _client) {
            client = _client;
          });
        } else {
          return new Future.value();
        }
      }
  
      Future _closeClient() {
        if (client != null && !keepOpen) client.dispose();
        return new Future.value(client);
      }
  
      // Temporary solution for testing reusing client
      if (client != null) {
        client.write(httpRequest);
        return null;
      }
  
      return _createClient().then((_) {
        /*%TRACE3*/ print("(4> 6/16/14): _createClient!"); // TRACE%
        client.write(httpRequest);
        return client.stream.timeout(new Duration(minutes: 1)).first;
      }).then((List<int> responseBytes) {
        String response = new String.fromCharCodes(responseBytes);
        List<String> lines = response.split('\n');
  