public async Task MainPageAsync()
        {
            //Initializing GPIO
            gpioController = GpioController.GetDefault();
            if (gpioController != null)
            {
                dout = gpioController.OpenPin(DOUT_PIN);
                clk  = gpioController.OpenPin(SLK_PIN);
                uhl  = new UserHardwareLinker(clk, dout);
                System.Diagnostics.Debug.WriteLine("Connected to Hardware via GPIO.");
            }
            else
            {
                System.Diagnostics.Debug.WriteLine("WARNING: Your machine does not support GPIO!");
            }

            //Start listening to messages from clients
            new ConnectionHandler(uhl);

            //Start Web Server
            new WebHandler(uhl);


            //loading permanent data from memory
            Task  loadTask = PermanentData.LoadFromMemoryAsync();
            await loadTask;

            Task putRecordTask = null;

            PermanentData.CurrIP = GetLocalIp();
            if (!PermanentData.Serial.Equals(PermanentData.NULL_SYMBOL))
            {
                putRecordTask = putRecordInDatabase(PermanentData.CurrIP, PermanentData.Serial);
            }
            if (uhl != null)
            {
                uhl.setParameters(PermanentData.Offset, PermanentData.Scale);
            }

            NetworkInformation.NetworkStatusChanged += NetworkInformation_NetworkStatusChanged;

            if (putRecordTask != null)
            {
                await putRecordTask;
            }
        }