.github.com/repos/"
      local targetSuffix = "/git/trees/master"
      local targetFlag = "?recursive=1"
      local targetFound = false

      print("    >> Checking repository: ".. repositoryIdentifier)

      local inetAddress = targetAddress.. repositoryIdentifier.. targetSuffix.. targetFlag
      local inetComponent = component.getPrimary("internet")

      local inetConnection = httpstream:new(inetComponent, inetAddress)
      inetConnection:setMaxTimeout(0.5)

      if (inetConnection:connect() == true) then
        local jsonData = ''
        local jsonObject = nil
        local jsonTable = {}

        for dataChunk in inetConnection:getData() do
          jsonData = jsonData.. dataChunk
        end

        inetConnection:disconnect()
        jsonObject = jsonparser:new()
        jsonTable = jsonObject:parse(jsonData)

        for i = 1, #jsonTable["tree"] do
          if (jsonTable["tree"][i]["path"] == packageIdentifier) then
            targetFound = true

            print("      >> Package '".. packageIdentifier.. "' found on repository: ".. repositoryIdentifier)
            print("      >> Would you like to install it from this source?")
            print("      >> Hit 'Y' to confirm, or 'N' to skip this repository")

            while (true) do
              local option = {event.pull("key_down")}

              if (option[3] == 89) then
                print("        >> Installation confirmed, continuing...")

                selectedRepository = repositoryIdentifier
                sourceAddress = jsonTable["tree"][i]["url"]
                inetAddress = jsonTable["tree"][i]["url"]

                inetConnection = httpstream:new(inetComponent, inetAddress)
                inetConnection:setMaxTimeout(0.5)

                if (inetConnection:connect() == true) then
                  jsonData = ''
                  jsonTable = {}

                  for dataChunk in inetConnection:getData() do
                    jsonData = jsonData.. dataChunk
                  end

                  inetConnection:disconnect()
                  jsonTable = jsonObject:parse(jsonData)

                  if (#jsonTable["tree"] == 2 and jsonTable["tree"][1]["path"] == "_bin" and jsonTable["tree"][2]["path"] == "_config") or
                     (#jsonTable["tree"] == 3 and jsonTable["tree"][1]["path"] == "README.md" and jsonTable["tree"][2]["path"] == "_bin" and jsonTable["tree"][3]["path"] == "_config") then
                        local repositoryAddress = "https://raw.githubusercontent.com/"
                        local repositoryPath = "_config/repository.info"
                        local repositoryBranch = "/master/"

                        inetAddress = repositoryAddress.. repositoryIdentifier.. repositoryBranch.. repositoryPath
                        inetConnection = httpstream:new(inetComponent, inetAddress)
                        inetConnection:setMaxTimeout(0.5)

                        if (inetConnection:connect() == true) then
                          local repositoryInfoData = ''
                          local repositoryInfoTable = {}

                          for dataChunk in inetConnection:getData() do
                            repositoryInfoData = repositoryInfoData.. dataChunk
                          end

                          repositoryInfoTable = xafcoreTable:loadFromString(repositoryInfoData)
                          repositoryInfoData = ''

                          if (configVersion > repositoryInfoTable["repository-xaf"]) then
                            local dataAddress = "https://raw.githubusercontent.com/"
                            local dataPath = "/_config/package.info"
                            local dataBranch = "/master/"

                            inetAddress = dataAddress.. repositoryIdentifier.. dataBranch.. packageIdentifier.. dataPath
                            inetConnection = httpstream:new(inetComponent, inetAddress)
                            inetConnection:setMaxTimeout(0.5)

                            if (inetConnection:connect() == true) then
                              local infoData = ''
                              local infoTable = {}

                              for dataChunk in inetConnection:getData() do
                                infoData = infoData.. dataChunk
                              end

                              infoTable = xafcoreTable:loadFromString(infoData)
                              infoData = ''

                              if (infoTable["package-description"] and infoTable["package-identifier"] and infoTable["package-index"] and
                                  infoTable["package-owner"] and infoTable["package-title"] and infoTable["package-version"] and infoTable["package-xaf"]) then
                                    if (packageName == infoTable["package-identifier"]) then
                                      if (configVersion > infoTable["package-xaf"]) then
                                        print("        >> Installing package '".. packageIdentifier.. "' from repository: ".. repositoryIdentifier)
                                        print("        >> All prerequisites have been checked")
                                        print("        >> Starting installation procedure...")

                                        inetAddress = sourceAddress.. targetFlag
                                        inetConnection = httpstream:new(inetComponent, inetAddress)
                                        inetConnection:setMaxTimeout(0.5)

                                        if (inetConnection:connect() == true) then
                                          jsonData = ''
                                          jsonTable = {}

                                          for dataChunk in inetConnection:getData() do
                                            jsonData = jsonData.. dataChunk
                                          end

                                          inetConnection:disconnect()
                                          jsonTable = jsonObject:parse(jsonData)
                                          filesystem.makeDirectory(filesystem.concat(pathRoot, pathPackages, packageName)) -- Create package master directory before downloading binaries

                                          for j = 1, #jsonTable["tree"] do
                                            local objectPath = jsonTable["tree"][j]["path"]
                                            local objectType = jsonTable["tree"][j]["type"]
                                            local pathRoot = "io.github.aquaver"
                                            local pathProject = "xaf-packages"

                                            if (objectPath ~= "README.md" or (objectPath == "README.md" and (options.r == true or options.readme == true))) then -- The user is able to include 'README.md' in downloaded package.
                                              if (objectType == "tree") then
                                                filesystem.makeDirectory(filesystem.concat(pathRoot, pathProject, packageName, objectPath))
                                              elseif (objectType == "blob") then
                                                local filePath = filesystem.concat(pathRoot, pathProject, packageName, objectPath)
                                                local fileObject = nil
                                                local fileSize = -1

                                                inetAddress = dataAddress.. repositoryIdentifier.. dataBranch.. packageIdentifier.. '/'.. objectPath
                                                inetConnection = httpstream:new(inetComponent, inetAddress)

                                                inetConnection:setMaxTimeout(0.5)
                                                print("          >> Trying to download: ".. packageName.. '/'.. objectPath)

                                                if (inetConnection:connect() == true) then
                                                  fileObject = filesystem.open(filePath, 'w')
                                                  fileSize = 0

                                                  for dataChunk in inetConnection:getData() do
                                                    fileObject:write(dataChunk)
                                                    fileSize = fileSize + unicode.wlen(dataChunk)
                                                  end

                                                  sourceTotalSize = sourceTotalSize + fileSize
                                                  fileObject:close()
                                                  print("            >> Downloaded file: ".. packageName.. '/'.. objectPath.. " (".. string.format("%.2f", fileSize / 1024).. " kB)")
                                                else
                                                  print("            >> Cannot download '".. packageName.. '/'.. objectPath.. "' file")
                                                end
                                              end
                                            end
                                          end

                                          local infoFile = filesystem.open(infoPath, 'w')
                                          local infoKey = packageName
                                          local infoValue = selectedRepository.. ':'.. packageCategory

                                          infoFile:write("[#] Extensible Application Framework Package Manager application source.".. '\n')
                                          infoFile:write("[#] This file stores specific packages source identifiers which are used in updating.".. '\n')
                                          infoFile:write("[#] Data represented in XAF Table Format.".. '\n'.. '\n')
                                          infoFile:close()

                                          infoDataTable[infoKey] = infoValue
                                          xafcoreTable:saveToFile(infoDataTable, infoPath, true)

                                          print("              >> Successfully downloaded package '".. packageIdentifier.. "' from repository: ".. repositoryIdentifier)
                                          print("              >> Downloaded package total size: ".. string.format("%.2f", sourceTotalSize / 1024).. " kB")
                                          print("              >> Installation procedure has been finished")
                                          print("              >> You can now use 'xaf-