diff --git a/server/src/Seed2.jws b/server/src/Seed2.jws
index c109c9f47f448f7f3f9df00ebe23f5ba740579c0..e301c2c3e80320c37f6d7262c0225d984a09f053 100644
--- a/server/src/Seed2.jws
+++ b/server/src/Seed2.jws
@@ -75,14 +75,19 @@ public class Seed2 {
     /* Used by getInventoryQueries() */
     private static final String INVTABLE = "";
     /* Used by getVersionFromFile() */
-    private static final String VERSIONFILE = "";
-    private static final String WINVERSIONFILE = "";
+    private static final String LINUX_VERFILE = "";
+    private static final String WIN_VERFILE = "";
+    private static final String ANDROID_PROINFO_VERFILE = "";
+    private static final String ANDROID_EDUBAR_VERFILE = "";
     /* Used by getUpdateLink() */
     private static final String BASEURL = "";
-    private static final String PACKAGENAME = "";
-    private static final String WINPACKAGENAME = "";
-    private static final String EXTENSION = "";
-    private static final String WINEXTENSION = "";
+    private static final String LINUX_PKGNAME = "";
+    private static final String WIN_PKGNAME = "";
+    private static final String ANDROID_PROINFO_PKGNAME = "";
+    private static final String ANDROID_EDUBAR_PKGNAME = "";
+    private static final String LINUX_EXTENSION = "";
+    private static final String WIN_EXTENSION = "";
+    private static final String ANDROID_EXTENSION = "";
 
 /******************************************************************************
  * #1 - Methods related to database
@@ -195,14 +200,14 @@ private static String createInventoryQuery(String table, String inep,
         String mac, String hdd1Model, String hdd1Size, String hdd1Used,
         String hdd2Model, String hdd2Size, String hdd2Used, String hddAd,
         String memSize, String model, String type, String distro,
-        String kernel, String timestamp, String project) {
+        String kernel, String timestamp, String project, String version) {
     StringBuilder sb = new StringBuilder("INSERT INTO ");
     sb.append(table);
     sb.append(" (sa_inep, sa_mac, sa_disco1_modelo, sa_disco1_capacidade,");
     sb.append(" sa_disco1_usado, sa_disco2_modelo, sa_disco2_capacidade,");
     sb.append(" sa_disco2_usado, sa_discos_ad, sa_memoria, sa_processador,");
     sb.append(" sa_so_nome, sa_so_distribuicao, sa_so_kernel, sa_data,");
-    sb.append(" sa_projeto) VALUES (");
+    sb.append(" sa_projeto, sa_versao) VALUES (");
 
     /* Inep */
     sb.append(createValueString(inep, "str", 1));
@@ -250,7 +255,10 @@ private static String createInventoryQuery(String table, String inep,
     sb.append(createValueString(timestamp, "str", 1));
 
     /* Project */
-    sb.append(createValueString(project, "int", 0));
+    sb.append(createValueString(project, "int", 1));
+
+    /* Version */
+    sb.append(createValueString(version, "str", 0));
 
     return sb.toString();
 }
@@ -497,7 +505,7 @@ private static void writeErrorToLog(String error, String comp) {
 }
 
 /**
- * Write an warning to log (TOMCAT_HOME/logs/catalina.out).
+ * Write a warning to log (TOMCAT_HOME/logs/catalina.out).
  *
  * @author                  Eduardo Luis Buratti
  * @param       warning     Warning string
@@ -510,6 +518,20 @@ private static void writeWarningToLog(String warning, String comp) {
     System.out.println("DEBUG[" + logTs + "]: WARNING: " + warning + ": " + comp + "\n");
 }
 
+/**
+ * Write a success message to log (TOMCAT_HOME/logs/catalina.out).
+ *
+ * @author                  Eduardo Luis Buratti
+ * @param       success     Success string
+ * @param       comp        Complement string (e.g. xml of inventory)
+ * @return                  String
+ */
+private static void writeSuccessToLog(String success, String comp) {
+    String logTs = createLogTimestamp();
+
+    System.out.println("DEBUG[" + logTs + "]: SUCCESS: " + success + ": " + comp + "\n");
+}
+
 /******************************************************************************
  * #5 - Methods related to regular expressions
  ******************************************************************************/
@@ -531,6 +553,25 @@ private static boolean matchRegExp(Pattern pattern, String match) {
     return false;
 }
 
+/**
+ * Verify if string passed by parameter is a valid agent version string.
+ *
+ * @author                  Eduardo Luis Buratti
+ * @param     version       String with agent version
+ * @return                  boolean
+ */
+private static boolean verifyAgentVersion(String version) {
+    /* Create regular expression object */
+    final String REGEX = "^([0-9])+\\.([0-9])+\\.([0-9])+$";
+    Pattern pattern = Pattern.compile(REGEX);
+
+    if (matchRegExp(pattern, version)) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
 /**
  * Verify if string passed by parameter is a valid MAC address string.
  *
@@ -603,6 +644,8 @@ private static String getErrorMessage(int eid) {
                  break;
         case 16: errorMessage = "network data older than 15 days, ignoring";
                  break;
+        case 17: errorMessage = "invalid agent version string";
+                break;
         default: errorMessage = "Invalid error id - 0";
     }
 
@@ -720,18 +763,19 @@ private static String getErrorMessage(int eid, String comp) {
  ******************************************************************************/
 
 /**
- * Verify errors on time string passed by parameter. Return 0 if no errors
- * were found. Anything different from 0 is an error code which will be
- * handled externally.
+ * Check for errors and apply some conversions (if needed).
  *
  * @author                  Danilo Kiyoshi Simizu Yorinori
  * @param       time        Time string
- * @return                  int
+ * @return                  String
+ * @throws                  Exception
  */
-private static int testNetTime(String time) {
+private static String parseNetTime(String time) throws Exception {
     String[] parts = time.split(":");
 
     /* Verify the number of splitted parts */
+
+    /* Old way: interval defined by the maximum time */
     if (parts.length == 2) {
         int hour = Integer.parseInt(parts[0]);
         int min = Integer.parseInt(parts[1]);
@@ -740,20 +784,56 @@ private static int testNetTime(String time) {
         /* Verify if minutes are in the interval of 5 minutes */
         /* e.g. 0, 5, 10, ... and so on */
         if ((min % 5) != 0) {
-            return -1;
+            throw new Exception(getErrorMessage(11));
         }
 
         /* Hour */
         /* Return error value if the hour is 24 and minutes are different  */
         /* from 0. e.g. 24:15, 24:55 */
         if ((hour == 24) && (min != 0)) {
-            return -2;
+            throw new Exception(getErrorMessage(12));
+        }
+
+        return String.format("%02d:%02d", hour, min);
+
+    /* New way: interval defined by the middle (average) time */
+    /* Introduced in agent-v1.4.1 */
+    } else if (parts.length == 3) {
+        int hour = Integer.parseInt(parts[0]);
+        int min = Integer.parseInt(parts[1]);
+        int second = Integer.parseInt(parts[2]);
+
+        /* Seconds */
+        /* Must be 30 because its the middle point between five minutes */
+        if (second != 30) {
+            throw new Exception(getErrorMessage(13));
+        }
+
+        /* Minutes */
+        /* Verify if minutes are in the interval of 5 minutes */
+        /* e.g. 00:02:30, 00:07:30, 00:12:30 ... and so on */
+        if ((min % 5) != 2) {
+            throw new Exception(getErrorMessage(11));
         }
+
+        /* Hour */
+        /* Just check boundaries */
+        if (hour > 23) {
+            throw new Exception(getErrorMessage(12));
+        }
+
+        // Temporary fix: convert to old format (max time)
+        // because the old database is still in use
+        min += 3;
+        if (min == 60) {
+            min = 0;
+            hour += 1;
+        }
+
+        return String.format("%02d:%02d", hour, min);
     } else {
-        return -3;
+        throw new Exception(getErrorMessage(13));
     }
-
-    return 0;
 }
 
 /**
@@ -916,20 +996,25 @@ throws Exception {
  * @return                  String
  * @throws                  Exception
  */
-private static String getVersionFromFile(int OperatingSystem)
+private static String getVersionFromFile(int os)
 throws Exception {
     /* Verify file existence and open it if exists */
     String versionFile = null;
-    if (OperatingSystem == 1) {
-        versionFile = WINVERSIONFILE;
-    } else {
-        versionFile = VERSIONFILE;
-    }
+
+    if (os == 0)
+        versionFile = LINUX_VERFILE;
+    else if (os == 1)
+        versionFile = WIN_VERFILE;
+    else if (os == 2)
+        versionFile = ANDROID_PROINFO_VERFILE;
+    else if (os == 3)
+        versionFile = ANDROID_EDUBAR_VERFILE;
+    else
+        throw new Exception("Invalid operation system (" + os + ")");
+
     File file = new File(versionFile);
-    if (! file.exists()) {
-        writeErrorToLog("Version file not found", "getVersionFromFile");
-        return "Version file not found";
-    }
+    if (! file.exists())
+        throw new Exception("Version file not found");
 
     /* Read file */
     FileReader vFile = new FileReader(versionFile);
@@ -950,12 +1035,10 @@ throws Exception {
     Pattern pattern = Pattern.compile(REGEX);
     String version = bufOutput.toString();
 
-    if (matchRegExp(pattern, version)) {
-        return version;
-    } else {
-        writeErrorToLog("Invalid version", "getVersionFromFile");
-        return "Invalid version";
-    }
+    if (! matchRegExp(pattern, version))
+        throw new Exception("Invalid version");
+
+    return version;
 }
 
 /******************************************************************************
@@ -1021,7 +1104,7 @@ private static String parseXMLDoc2String(Document doc) {
  * @throws                     Exception
  */
 private static String getNetQueries(NodeList useNodeList, String inep,
-                                    String mac)
+                                    String mac, String version)
 throws Exception {
     /* Variables */
     String errorMsg = null;
@@ -1041,22 +1124,22 @@ throws Exception {
         bandwidthTag = getChildTag(useNodeList,"use","bandwidth-usage");
     }
     catch (Exception e) {
-        writeWarningToLog(e.getMessage(), "inep: " + inep + "; mac: " + mac);
+        writeWarningToLog(e.getMessage(), "inep: " + inep + "; mac: " + mac + "; version: " + version);
         return null;
     }
 
     if (bandwidthTag.getNodeName() == "network") {
         /* Old agent version, accept it but log */
-        writeWarningToLog(getErrorMessage(15), "inep: " + inep + "; mac: " + mac);
+        writeWarningToLog(getErrorMessage(15), "inep: " + inep + "; mac: " + mac + "; version: " + version);
         return null;
     } else if (bandwidthTag.getNodeName() == "bandwidth-usage") {
         /* 288 is related to interval number of 5 minutes in a day */
         NodeList useTagList = getChildNodes(bandwidthTag);
         if (useTagList == null) {
-            writeWarningToLog(getErrorMessage(8, "bandwidth-usage"), "inep: " + inep + "; mac: " + mac);
+            writeWarningToLog(getErrorMessage(8, "bandwidth-usage"), "inep: " + inep + "; mac: " + mac + "; version: " + version);
             return null;
         } else if (useTagList.getLength() != 288) {
-            writeWarningToLog(getErrorMessage(8, "bandwidth-usage"), "inep: " + inep + "; mac: " + mac);
+            writeWarningToLog(getErrorMessage(8, "bandwidth-usage"), "inep: " + inep + "; mac: " + mac + "; version: " + version);
             return null;
         }
 
@@ -1113,12 +1196,12 @@ throws Exception {
                 try {
                     index = Integer.parseInt(indexTmp);
                 } catch (Exception e) {
-                    writeWarningToLog(getErrorMessage(12, "id"), "inep: " + inep + "; mac: " + mac);
+                    writeWarningToLog(getErrorMessage(12, "id"), "inep: " + inep + "; mac: " + mac + "; version: " + version);
                     return null;
                 }
                 /* Verify index value */
                 if ((index < 1) || (index > 288)) {
-                    writeWarningToLog(getErrorMessage(9), "inep: " + inep + "; mac: " + mac);
+                    writeWarningToLog(getErrorMessage(9), "inep: " + inep + "; mac: " + mac + "; version: " + version);
                     return null;
                 }
             }
@@ -1130,7 +1213,7 @@ throws Exception {
                 (rxBytes[0] != rxBytes[index]) ||
                 (txPkts[0]  != netTime[index]) ||
                 (rxBytes[0] != netTime[index])) {
-                writeWarningToLog(getErrorMessage(13, indexTmp), "inep: " + inep + "; mac: " + mac);
+                writeWarningToLog(getErrorMessage(13, indexTmp), "inep: " + inep + "; mac: " + mac + "; version: " + version);
                 return null;
             }
 
@@ -1140,7 +1223,7 @@ throws Exception {
             /* 4 is related to date, time, rx and tx tags */
             int netuseChildren = 4;
             if (netuseTagList.getLength() != netuseChildren) {
-                writeWarningToLog(getErrorMessage(8, "netuse"), "inep: " + inep + "; mac: " + mac);
+                writeWarningToLog(getErrorMessage(8, "netuse"), "inep: " + inep + "; mac: " + mac + "; version: " + version);
                 return null;
             }
 
@@ -1162,25 +1245,25 @@ throws Exception {
                             calTmp.setTime(dTmp);
                         } catch (Exception e) {
                             errorMsg = getErrorMessage(10, e.getMessage());
-                            writeWarningToLog(errorMsg, "inep: " + inep + "; mac: " + mac);
+                            writeWarningToLog(errorMsg, "inep: " + inep + "; mac: " + mac + "; version: " + version);
                             return null;
                         }
 
                         calNow = Calendar.getInstance();
                         if (calTmp.after(calNow)) {
-                            writeWarningToLog(getErrorMessage(10), "inep: " + inep + "; mac: " + mac);
+                            writeWarningToLog(getErrorMessage(10), "inep: " + inep + "; mac: " + mac + "; version: " + version);
                             return null;
                         } else {
                             calNow.add(Calendar.DATE, -15);
                             if (calTmp.before(calNow)) {
-                                writeWarningToLog(getErrorMessage(16), "inep: " + inep + "; mac: " + mac);
+                                writeWarningToLog(getErrorMessage(16), "inep: " + inep + "; mac: " + mac + "; version: " + version);
                                 return null;
                             } else {
                                 netDate[index] = dateTmp;
                             }
                         }
                     } else {
-                        writeWarningToLog(getErrorMessage(3, "net date"), "inep: " + inep + "; mac: " + mac);
+                        writeWarningToLog(getErrorMessage(3, "net date"), "inep: " + inep + "; mac: " + mac + "; version: " + version);
                         return null;
                     }
                     dateParsed = true;
@@ -1192,33 +1275,14 @@ throws Exception {
                     /* Validate net date value */
                     if (validateStringDataValue(timeTmp)) {
                         try {
-                            timeFormat = new SimpleDateFormat("kk:mm");
-                            timeFormat.setLenient(false);
-                            Date dTimeTmp = timeFormat.parse(timeTmp);
-                        } catch (Exception e) {
-                            errorMsg = getErrorMessage(11, e.getMessage());
-                            writeWarningToLog(errorMsg, "inep: " + inep + "; mac: " + mac);
-                            return null;
-                        }
-
-                        int resultNetTime = testNetTime(timeTmp);
-                        switch (resultNetTime) {
-                            case 0:  netTime[index] = timeTmp;
-                                     break;
-                            case -1: errorMsg = getErrorMessage(11);
-                                     break;
-                            case -2: errorMsg = getErrorMessage(12);
-                                     break;
-                            case -3: errorMsg = getErrorMessage(13);
-                                     break;
-                            default: errorMsg = getErrorMessage(13);
+                            netTime[index] = parseNetTime(timeTmp);
                         }
-                        if (errorMsg != null) {
-                            writeWarningToLog(errorMsg, "inep: " + inep + "; mac: " + mac);
+                        catch (Exception e) {
+                            writeWarningToLog(e.getMessage(), "inep: " + inep + "; mac: " + mac + "; version: " + version);
                             return null;
                         }
                     } else {
-                        writeWarningToLog(getErrorMessage(3, "net time"), "inep: " + inep + "; mac: " + mac);
+                        writeWarningToLog(getErrorMessage(3, "net time"), "inep: " + inep + "; mac: " + mac + "; version: " + version);
                         return null;
                     }
                     timeParsed = true;
@@ -1231,7 +1295,7 @@ throws Exception {
 
                     /* Verify if <rx> doesn't have only two children */
                     if (rxTagList.getLength() != 2) {
-                        writeWarningToLog(getErrorMessage(8, "rx"), "inep: " + inep + "; mac: " + mac);
+                        writeWarningToLog(getErrorMessage(8, "rx"), "inep: " + inep + "; mac: " + mac + "; version: " + version);
                         return null;
                     }
 
@@ -1279,7 +1343,7 @@ throws Exception {
                             } else {
                                 errorMsg = getErrorMessage(8);
                             }
-                            writeWarningToLog(errorMsg, "inep: " + inep + "; mac: " + mac);
+                            writeWarningToLog(errorMsg, "inep: " + inep + "; mac: " + mac + "; version: " + version);
                             return null;
                         }
                     }
@@ -1293,7 +1357,7 @@ throws Exception {
 
                     /* Verify if <tx> doesn't have only two children */
                     if (txTagList.getLength() != 2) {
-                        writeWarningToLog(getErrorMessage(8, "tx"), "inep: " + inep + "; mac: " + mac);
+                        writeWarningToLog(getErrorMessage(8, "tx"), "inep: " + inep + "; mac: " + mac + "; version: " + version);
                         return null;
                     }
 
@@ -1341,7 +1405,7 @@ throws Exception {
                             } else {
                                 errorMsg = getErrorMessage(8);
                             }
-                            writeWarningToLog(errorMsg, "inep: " + inep + "; mac: " + mac);
+                            writeWarningToLog(errorMsg, "inep: " + inep + "; mac: " + mac + "; version: " + version);
                             return null;
                         }
                     }
@@ -1368,7 +1432,7 @@ throws Exception {
                     } else {
                         errorMsg = getErrorMessage(6);
                     }
-                    writeWarningToLog(errorMsg, "inep: " + inep + "; mac: " + mac);
+                    writeWarningToLog(errorMsg, "inep: " + inep + "; mac: " + mac + "; version: " + version);
                     return null;
                 }
             }
@@ -1392,7 +1456,7 @@ throws Exception {
         return netQueries;
     }
     else {
-        writeWarningToLog(getErrorMessage(4, "bandwidth-usage"), "inep: " + inep + "; mac: " + mac);
+        writeWarningToLog(getErrorMessage(4, "bandwidth-usage"), "inep: " + inep + "; mac: " + mac + "; version: " + version);
         return null;
     }
 }
@@ -1408,6 +1472,7 @@ throws Exception {
 private static String getInventoryQueries(Document invXML)
 throws Exception {
     /* Inventory variables */
+    String version = null;
     String inep = null;
     String memSize = null;
     String memSizeTmp = null;
@@ -1415,7 +1480,10 @@ throws Exception {
     String type = null;
     String distro = null;
     String model = null;
+    String tmpMacAddr = null;
     String macAddr = null;
+    String otherMacs = "";
+    Node macNumberTag = null;
     Integer quantity = 0;
     String hddAd = "0";
     String hddModelTmp = null;
@@ -1434,7 +1502,8 @@ throws Exception {
 
     /* Pattern strings - main tags */
     String strCollect = "collect";
-    String strMac = "mac-address";
+    String strAgent = "agent";
+    String strMacAddr = "mac-address";
     String strInep = "inep";
     String strUse = "use";
     String strInv = "inventory";
@@ -1445,8 +1514,9 @@ throws Exception {
     String strDisk = "disk";
     /* Pattern strings - child tags or for error messages */
     String strNum = "number";
+    String strVersion = "version";
     String strICode = "inep code";
-    String strMNum = "mac-address number";
+    String strMac = "mac";
     String strProjSrc = "project source";
     String strSrc = "source";
     String strMod = "model";
@@ -1458,9 +1528,12 @@ throws Exception {
     String strHdd = "hdd";
     String strQtt = "quantity";
 
+    Boolean first = true;
+
     /* Main Tags */
     NodeList collect = getTagList(invXML, strCollect, 1);
-    NodeList macTagList = getTagList(invXML, strMac, 1);
+    NodeList agentTagList = invXML.getElementsByTagName(strAgent);
+    NodeList macTagList = getTagList(invXML, strMacAddr, 1);
     NodeList inepTagList = getTagList(invXML, strInep, 1);
     NodeList useTagList = getTagList(invXML, strUse, 1);
     NodeList invTagList = getTagList(invXML, strInv, 1);
@@ -1471,6 +1544,39 @@ throws Exception {
     NodeList memoryTagList = getTagList(invXML, strMem, 1);
     NodeList diskTagList = getTagList(invXML, strDisk, 1);
 
+    /* AGENT */
+    if ((agentTagList != null) && (agentTagList.getLength() > 0)) {
+        if (agentTagList.item(0).hasChildNodes()) {
+            NodeList agentVersionChilds = agentTagList.item(0).getChildNodes();
+
+            if ((agentVersionChilds != null) && (agentVersionChilds.getLength() == 1)) {
+                Node agentVersionTag = agentVersionChilds.item(0);
+                /* Check <agent> */
+                if (validateTagName(agentVersionTag, strVersion) == true) {
+                    /* VERSION */
+                    version = getAttributeValue(agentVersionTag, "value");
+                    if (validateStringDataValue(version)) {
+                        /* Agent version verification */
+                        if (!verifyAgentVersion(version)) {
+                            throw new Exception(getErrorMessage(17));
+                        }
+                    } else {
+                        throw new Exception(getErrorMessage(7, strVersion));
+                    }
+                } else {
+                    throw new Exception(getErrorMessage(4, strVersion));
+                }
+            } else {
+                throw new Exception(getErrorMessage(1, strVersion));
+            }
+        } else {
+            throw new Exception(getErrorMessage(3, strAgent));
+        }
+    } else {
+        version = "0.0.0";
+    }
+
+
     /* INEP */
     Node inepNumberTag = getChildTag(inepTagList, strInep, strICode);
     /* Check <inep> */
@@ -1495,23 +1601,51 @@ throws Exception {
     }
 
     /* MAC */
-    Node macNumberTag = getChildTag(macTagList, strMac, strMNum);
-    /* Check <mac-address> */
-    if (validateTagName(macNumberTag, strNum) == true) {
-        /* MAC ADDRESS NUMBER */
-        macAddr = getAttributeValue(macNumberTag, "value");
-        if (validateStringDataValue(macAddr)) {
-            /* Mac address verification */
-            if (!verifyMacAddr(macAddr)) {
-                throw new Exception(getErrorMessage(3));
-            /* Mac-address string standardization */
-            } else {
-                macAddr = macAddr.replace('-',':');
-                macAddr = macAddr.toUpperCase();
+    otherMacs = "{";
+    NodeList macNumbers = getChildNodes(macTagList);
+    if ((macNumbers != null) && (macNumbers.getLength() > 0)) {
+        for (int i = 0; i < macNumbers.getLength(); i++) {
+            macNumberTag = macNumbers.item(i);
+
+            /* Check <mac-address> */
+            if ((macNumberTag != null) &&
+                 ((macNumberTag.getNodeName() == "number") || (macNumberTag.getNodeName() == "mac"))) {
+
+                /* MAC ADDRESS NUMBER */
+                tmpMacAddr = getAttributeValue(macNumberTag, "value");
+                if (validateStringDataValue(tmpMacAddr)) {
+                    /* Mac address verification */
+                    if (verifyMacAddr(tmpMacAddr)) {
+                        /* Mac-address string standardization */
+                        tmpMacAddr = tmpMacAddr.replace('-',':');
+                        tmpMacAddr = tmpMacAddr.toUpperCase();
+
+                        if (macAddr == null) {
+                            macAddr = tmpMacAddr;
+                        } else {
+                            if (!first)
+                                otherMacs += ", ";
+                            else
+                                first = false;
+
+                            otherMacs += tmpMacAddr;
+                        }
+                    } else {
+                        writeWarningToLog(getErrorMessage(3), "inep: " + inep + "; mac: " + tmpMacAddr + "; version: " + version);
+                    }
+                } else {
+                    writeWarningToLog(getErrorMessage(3, strMac), "inep: " + inep + "; version: " + version);
+                }
             }
-        } else {
-            throw new Exception(getErrorMessage(3, strMNum));
         }
+    } else {
+        throw new Exception(getErrorMessage(3, strMacAddr));
+    }
+    otherMacs += "}";
+
+    /* Verify if we have a valid macAddr */
+    if (!validateStringDataValue(macAddr)) {
+        throw new Exception(getErrorMessage(3));
     }
 
     /* PROJECT */
@@ -1759,7 +1893,7 @@ throws Exception {
     /* If project is proinfodata, get net data */
     if (sourceTmp == 0) {
         try {
-            netQueries = getNetQueries(useTagList, inep, macAddr);
+            netQueries = getNetQueries(useTagList, inep, macAddr, version);
         } catch(Exception e) {
             throw new Exception(e.getMessage());
         }
@@ -1774,22 +1908,24 @@ throws Exception {
     if (quantity == 0) {
         query = createInventoryQuery(INVTABLE, inep, macAddr, null, null,
                   null, null, null, null, hddAd, memSize, model, type,
-                  distro, kernel, dateTimestamp, project);
+                  distro, kernel, dateTimestamp, project, version);
     } else if (quantity == 1) {
         query = createInventoryQuery(INVTABLE, inep, macAddr, hddModel[0],
                   hddSize[0], hddUsed[0], null, null, null, hddAd, memSize,
-                  model, type, distro, kernel, dateTimestamp, project);
+                  model, type, distro, kernel, dateTimestamp, project, version);
     } else  {
         quantity = quantity - 2;
         hddAd = quantity.toString();
         query = createInventoryQuery(INVTABLE, inep, macAddr, hddModel[0],
                   hddSize[0], hddUsed[0], hddModel[1], hddSize[1],
                   hddUsed[1], hddAd, memSize, model, type, distro,
-                  kernel, dateTimestamp, project);
+                  kernel, dateTimestamp, project, version);
     }
 
     /* Return inventory queries */
     if (netQueries != null) {
+        writeSuccessToLog("XML parsed with success", "inep: " + inep + "; mac: " + macAddr + "; version: " + version + "; other-macs: " + otherMacs);
+
         return query + "; " + netQueries;
     } else {
         return query;
@@ -1868,13 +2004,9 @@ public static boolean verifyId(String inep) {
  * @author               Danilo Kiyoshi Simizu Yorinori
  * @return               String
  */
-public static String getAgentVersion(int OperatingSystem) {
+public static String getAgentVersion(int os) {
     try {
-        if (OperatingSystem == 1) {
-            return getVersionFromFile(1);
-        } else {
-            return getVersionFromFile(0);
-        }
+        return getVersionFromFile(os);
     } catch (Exception e) {
         writeErrorToLog(e.getMessage(), "getAgentVersion");
         return null;
@@ -1888,12 +2020,8 @@ public static String getAgentVersion(int OperatingSystem) {
  * @return               String
  */
 public static String getAgentVersion() {
-    try {
-        return getVersionFromFile(0);
-    } catch (Exception e) {
-        writeErrorToLog(e.getMessage(), "getAgentVersion");
-        return null;
-    }
+    /* Defautl os = 0 (linux) */
+    return getAgentVersion(0);
 }
 
 /**
@@ -1934,38 +2062,22 @@ public static String setInventory(String inventory) {
  * @author                    Danilo Kiyoshi Simizu Yorinori
  * @return                    String
  */
-public static String getUpdateLink(int OperatingSystem)
+public static String getUpdateLink(int os)
 {
-    String version = null;
-
-    /* Get version from file */
     try {
-        if (OperatingSystem == 1) {
-            version = getVersionFromFile(1);
-        } else {
-            version = getVersionFromFile(0);
-        }
-
-        /* Create regular expression object */
-        final String REGEX = "^\\d++\\.\\d++\\.\\d++$";
-        Pattern pattern = Pattern.compile(REGEX);
-
-        /* Verify version string */
-        if (version == null) {
-            return null;
-        } else if (version.equals("Invalid version")) {
+        String version = getVersionFromFile(os);
+
+        if (os == 0)
+            return BASEURL + LINUX_PKGNAME + version + LINUX_EXTENSION;
+        else if (os == 1)
+            return BASEURL + WIN_PKGNAME + version + WIN_EXTENSION;
+        else if (os == 2)
+            return BASEURL + ANDROID_PROINFO_PKGNAME + version + ANDROID_EXTENSION;
+        else if (os == 3)
+            return BASEURL + ANDROID_EDUBAR_PKGNAME + version + ANDROID_EXTENSION;
+        else
             return null;
-        } else if (version.equals("Version file not found")) {
-            return null;
-        } else if (matchRegExp(pattern, version)) {
-            if (OperatingSystem == 1) {
-                return BASEURL + WINPACKAGENAME + version + WINEXTENSION;
-            } else {
-                return BASEURL + PACKAGENAME + version + EXTENSION;
-            }
-        } else {
-            return null;
-        }
+
     } catch (Exception e) {
         writeErrorToLog(e.getMessage(), "getUpdateLink");
         return null;
@@ -1981,32 +2093,8 @@ public static String getUpdateLink(int OperatingSystem)
  */
 public static String getUpdateLink()
 {
-    String version = null;
-
-    /* Get version from file */
-    try {
-        version = getVersionFromFile(0);
-
-        /* Create regular expression object */
-        final String REGEX = "^\\d++\\.\\d++\\.\\d++$";
-        Pattern pattern = Pattern.compile(REGEX);
-
-        /* Verify version string */
-        if (version == null) {
-            return null;
-        } else if (version.equals("Invalid version")) {
-            return null;
-        } else if (version.equals("Version file not found")) {
-            return null;
-        } else if (matchRegExp(pattern, version)) {
-            return BASEURL + PACKAGENAME + version + EXTENSION;
-        } else {
-            return null;
-        }
-    } catch (Exception e) {
-        writeErrorToLog(e.getMessage(), "getUpdateLink");
-        return null;
-    }
+    /* Default os = 0 (linux) */
+    return getUpdateLink(0);
 }
 
 /**