 void ethernetConnect();
 void serverCheck();
 String serverHeader(String);
-String requestHeader(String url);
-bool networkRequest(IPAddress server, String url);
+String requestHeader(String);
+bool networkRequestIP(IPAddress, String);
 
 void triggerCheck();
 void gotTriggered();

#ifdef USE_XS1_SERVER
void xs1Push()
{
  IPAddress server XS1_IP;
  String url = XS1_URL+String(storage[storagePointer]);
  if (networkRequest(server, url) == true)
  {
    Serial.println("XS1 updated");
  } else
  {
    Serial.println("XS1 update failed");
  }
}  
#endif

#ifdef USE_NETWORK
bool networkRequest(IPAddress server, String url)
{
  if (client.connect(server, 80))
  {
    requestHeader(url).toCharArray(requestBuffer, 128);
    client.write(requestBuffer);

  if (pointer != storagePointer)
  {
    #ifdef USE_NETWORK
      // Only push if this is not the first iteration
      if (storagePointer != -1)
      {
        push();
      }
    #endif
    
    storagePointer = pointer;
    pointerChanged();
  }
