Merge remote-tracking branch 'refs/remotes/origin/Beta-Build'

Brian [2016-07-31 12:36:32]
Merge remote-tracking branch 'refs/remotes/origin/Beta-Build'
Filename
PokemonGo/RocketAPI/Client.cs
PokemonGo/RocketAPI/Exceptions/LoginFailedException.cs
PokemonGo/RocketAPI/Extensions/HttpClientExtensions.cs
PokemonGo/RocketAPI/Extensions/LatLongExtensions.cs
PokemonGo/RocketAPI/GPSOAuthSharp.cs
PokemonGo/RocketAPI/GeneratedCode/Payloads.cs
PokemonGo/RocketAPI/Helpers/JsonHelper.cs
PokemonGo/RocketAPI/ILatLong.cs
PokemonGo/RocketAPI/ISettings.cs
PokemonGo/RocketAPI/Login/GoogleLogin.cs
PokemonGo/RocketAPI/Login/ILoginType.cs
PokemonGo/RocketAPI/Login/PtcLogin.cs
PokemonGo/RocketAPI/PokemonGo.RocketAPI.csproj
PokemonGo/RocketAPI/ProtoAdditions.cs
PokemonGo/RocketAPI/Window/App.config
PokemonGo/RocketAPI/Window/LocationManager.cs
PokemonGo/RocketAPI/Window/MainForm.Designer.cs
PokemonGo/RocketAPI/Window/MainForm.cs
PokemonGo/RocketAPI/Window/MainForm.resx
PokemonGo/RocketAPI/Window/MapForm.cs
PokemonGo/RocketAPI/Window/PokeUi.Designer.cs
PokemonGo/RocketAPI/Window/PokeUi.cs
PokemonGo/RocketAPI/Window/PokemonForm.cs
PokemonGo/RocketAPI/Window/PokemonGo.RocketAPI.Window.csproj
PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs
PokemonGo/RocketAPI/Window/RouteOptimizer.cs
PokemonGo/RocketAPI/Window/S2GMapDrawer.cs
PokemonGo/RocketAPI/Window/Settings.cs
PokemonGo/RocketAPI/Window/SettingsForm.Designer.cs
PokemonGo/RocketAPI/Window/SettingsForm.cs
PokemonGo/RocketAPI/Window/packages.config
PokemonGo/RocketAPI/packages.config
diff --git a/PokemonGo/RocketAPI/Client.cs b/PokemonGo/RocketAPI/Client.cs
index 94ccfa9..5c4ae6c 100644
--- a/PokemonGo/RocketAPI/Client.cs
+++ b/PokemonGo/RocketAPI/Client.cs
@@ -20,7 +20,7 @@ using System.Threading;
 using PokemonGo.RocketAPI.Exceptions;
 using System.Text;
 using System.IO;
-using DankMemes.GPSOAuthSharp;
+using Newtonsoft.Json;

 #endregion

@@ -32,13 +32,14 @@ namespace PokemonGo.RocketAPI
         private ISettings _settings;
         private string _accessToken;
         private string _apiUrl;
-        private AuthType _authType = AuthType.Google;

         private double _currentLat;
         private double _currentLng;
         private Request.Types.UnknownAuth _unknownAuth;
         public static string AccessToken { get; set; } = string.Empty;

+        private readonly ILoginType login;
+
         public Client(ISettings settings)
         {
             _settings = settings;
@@ -58,6 +59,20 @@ namespace PokemonGo.RocketAPI
             _httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Accept", "*/*");
             _httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type",
                 "application/x-www-form-urlencoded");
+
+            login = CreateLoginType(settings);
+        }
+
+        static ILoginType CreateLoginType(ISettings settings)
+        {
+            switch (settings.AuthType)
+            {
+                case AuthType.Google:
+                    return new GoogleLogin(settings.Email, settings.Password);
+                case AuthType.Ptc:
+                    return new PtcLogin(settings.PtcUsername, settings.PtcPassword);
+            }
+            throw new ArgumentOutOfRangeException(nameof(settings.AuthType), "unknown auth type");
         }

         public async Task<CatchPokemonResponse> CatchPokemon(ulong encounterId, string spawnPointGuid, double pokemonLat,
@@ -86,36 +101,27 @@ namespace PokemonGo.RocketAPI
                         catchPokemonRequest);
         }

-        public async Task DoGoogleLogin(string email, string password)
+        public async Task Login()
         {
-            _authType = AuthType.Google;
-            GPSOAuthClient _GPSOclient = new GPSOAuthClient(email, password);
-            Dictionary<string, string> _GPSOresponse = _GPSOclient.PerformMasterLogin();
-            /* string json = JsonConvert.SerializeObject(_GPSOresponse, Formatting.Indented);
-               Console.WriteLine(json); */
-            if (_GPSOresponse.ContainsKey("Token"))
+            string errorMessage;
+            do
             {
-                string token = _GPSOresponse["Token"];
-                Dictionary<string, string> oauthResponse = _GPSOclient.PerformOAuth(
-                token,
-                "audience:server:client_id:848232511240-7so421jotr2609rmqakceuu1luuq0ptb.apps.googleusercontent.com",
-                "com.nianticlabs.pokemongo",
-                "321187995bc7cdc2b5fc91b11a96e2baa8602c62");
-                /* string oauthJson = JsonConvert.SerializeObject(oauthResponse, Formatting.Indented);
-                  Console.WriteLine(oauthJson); */
-                _accessToken = oauthResponse["Auth"];
-            }
-        }
+                errorMessage = null;
+
+                try
+                {
+                    _accessToken = await login.GetAccessToken().ConfigureAwait(false);
+                }
+                catch (LoginFailedException) { errorMessage = "Login failed - wrong username or password? - Restarting"; }
+                catch (PtcOfflineException) { errorMessage = "PTC login server is down - Restarting"; }
+                catch (JsonReaderException) { errorMessage = "Json Reader Exception - Server down? - Restarting"; }
+                catch (Exception ex) { errorMessage = ex.ToString() + "Exception - Please report - Restarting"; }
+
+                if (errorMessage != null)
+                    ColoredConsoleWrite(ConsoleColor.White, errorMessage);
+
+            } while (errorMessage != null);

-        public async Task DoPtcLogin(string username, string password)
-        {
-            try
-            {
-                _accessToken = await PtcLogin.GetAccessToken(username, password);
-                _authType = AuthType.Ptc;
-            }
-            catch (Newtonsoft.Json.JsonReaderException) { ColoredConsoleWrite(ConsoleColor.White, "Json Reader Exception - Server down? - Restarting"); DoPtcLogin(username, password); }
-            catch (Exception ex) { ColoredConsoleWrite(ConsoleColor.White, ex.ToString() + "Exception - Please report - Restarting"); DoPtcLogin(username, password); }
         }

         public async Task<EncounterResponse> EncounterPokemon(ulong encounterId, string spawnPointGuid)
@@ -249,7 +255,12 @@ namespace PokemonGo.RocketAPI
             ConsoleColor originalColor = System.Console.ForegroundColor;
             System.Console.ForegroundColor = color;
             System.Console.WriteLine("[" + DateTime.Now.ToString("HH:mm:ss tt") + "] " + text);
-            File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory + @"\Logs.txt", "[" + DateTime.Now.ToString("HH:mm:ss tt") + "] " + text + "\n");
+
+            var dir = AppDomain.CurrentDomain.BaseDirectory + @"\Logs";
+            if (!Directory.Exists(dir))
+                Directory.CreateDirectory(dir);
+            File.AppendAllText(dir + @"\" + DateTime.Today.ToString("yyyyMMdd") + ".txt", "[" + DateTime.Now.ToString("HH:mm:ss tt") + "] " + text + "\r\n");
+
             System.Console.ForegroundColor = originalColor;
         }

@@ -326,7 +337,7 @@ namespace PokemonGo.RocketAPI

         public async Task<GetPlayerResponse> GetProfile()
         {
-            var profileRequest = RequestBuilder.GetInitialRequest(_accessToken, _authType, _currentLat, _currentLng, 10,
+            var profileRequest = RequestBuilder.GetInitialRequest(_accessToken, _settings.AuthType, _currentLat, _currentLng, 10,
                 new Request.Types.Requests { Type = (int)RequestType.GET_PLAYER });
             return
                 await _httpClient.PostProtoPayload<Request, GetPlayerResponse>($"https://{_apiUrl}/rpc", profileRequest);
@@ -383,7 +394,7 @@ namespace PokemonGo.RocketAPI

         public async Task SetServer()
         {
-            var serverRequest = RequestBuilder.GetInitialRequest(_accessToken, _authType, _currentLat, _currentLng, 10,
+            var serverRequest = RequestBuilder.GetInitialRequest(_accessToken, _settings.AuthType, _currentLat, _currentLng, 10,
                 RequestType.GET_PLAYER, RequestType.GET_HATCHED_OBJECTS, RequestType.GET_INVENTORY,
                 RequestType.CHECK_AWARDED_BADGES, RequestType.DOWNLOAD_SETTINGS);
             var serverResponse = await _httpClient.PostProto(Resources.RpcUrl, serverRequest);
@@ -416,14 +427,20 @@ namespace PokemonGo.RocketAPI
                         releasePokemonRequest);
         }

-        public double getCurrentLat()
+        public double CurrentLatitude
         {
-            return this._currentLat;
+            get
+            {
+                return this._currentLat;
+            }
         }

-        public double getCurrentLong()
+        public double CurrentLongitude
         {
-            return this._currentLng;
+            get
+            {
+                return this._currentLng;
+            }
         }

         public async Task<PlayerUpdateResponse> UpdatePlayerLocation(double lat, double lng)
diff --git a/PokemonGo/RocketAPI/Exceptions/LoginFailedException.cs b/PokemonGo/RocketAPI/Exceptions/LoginFailedException.cs
new file mode 100644
index 0000000..37bd893
--- /dev/null
+++ b/PokemonGo/RocketAPI/Exceptions/LoginFailedException.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace PokemonGo.RocketAPI.Exceptions
+{
+    public class LoginFailedException : Exception
+    {
+    }
+}
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/Extensions/HttpClientExtensions.cs b/PokemonGo/RocketAPI/Extensions/HttpClientExtensions.cs
index 81d97cb..e543a7a 100644
--- a/PokemonGo/RocketAPI/Extensions/HttpClientExtensions.cs
+++ b/PokemonGo/RocketAPI/Extensions/HttpClientExtensions.cs
@@ -28,12 +28,12 @@ namespace PokemonGo.RocketAPI.Extensions
             return decodedResponse;
         }

-   private static bool waitingForResponse = false;
-    public static async Task<TResponsePayload> PostProtoPayload<TRequest, TResponsePayload>(this HttpClient client,
-        string url, TRequest request) where TRequest : IMessage<TRequest>
-        where TResponsePayload : IMessage<TResponsePayload>, new()
-    {
-        ByteString payload = null;
+        private static bool waitingForResponse = false;
+        public static async Task<TResponsePayload> PostProtoPayload<TRequest, TResponsePayload>(this HttpClient client,
+            string url, TRequest request) where TRequest : IMessage<TRequest>
+            where TResponsePayload : IMessage<TResponsePayload>, new()
+        {
+            ByteString payload = null;

             while (waitingForResponse)
                 await Task.Delay(30);
@@ -58,11 +58,11 @@ namespace PokemonGo.RocketAPI.Extensions
             } while (response.Payload.Count < 1 && count < 30);
             payload = response.Payload[0];

-        var parsedPayload = new TResponsePayload();
-        parsedPayload.MergeFrom(payload);
+            var parsedPayload = new TResponsePayload();
+            parsedPayload.MergeFrom(payload);

-        return parsedPayload;
-    }
+            return parsedPayload;
+        }
         public static void ColoredConsoleWrite(ConsoleColor color, string text)
         {
             ConsoleColor originalColor = System.Console.ForegroundColor;
@@ -72,4 +72,4 @@ namespace PokemonGo.RocketAPI.Extensions
         }

     }
-}
+}
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/Extensions/LatLongExtensions.cs b/PokemonGo/RocketAPI/Extensions/LatLongExtensions.cs
new file mode 100644
index 0000000..94c98cd
--- /dev/null
+++ b/PokemonGo/RocketAPI/Extensions/LatLongExtensions.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PokemonGo.RocketAPI.Extensions
+{
+    public static class LatLongExtensions
+    {
+        public static double distanceFrom(this ILatLong c1, ILatLong c2)
+        {
+            double R = 6371e3;
+            Func<double, float> toRad = x => (float)(x * (Math.PI / 180));
+            float lat1 = toRad(c1.Latitude);
+            float lat2 = toRad(c2.Latitude);
+            float dLat = toRad(c2.Latitude - c1.Latitude);
+            float dLng = toRad(c2.Longitude - c1.Longitude);
+            double h = Math.Sin(dLat / 2) * Math.Sin(dLat / 2) + Math.Cos(lat1) * Math.Cos(lat2) * Math.Sin(dLng / 2) * Math.Sin(dLng / 2);
+            double c = 2 * Math.Atan2(Math.Sqrt(h), Math.Sqrt(1 - h));
+            return R * c;
+        }
+    }
+}
+
diff --git a/PokemonGo/RocketAPI/GPSOAuthSharp.cs b/PokemonGo/RocketAPI/GPSOAuthSharp.cs
deleted file mode 100644
index 9415c32..0000000
--- a/PokemonGo/RocketAPI/GPSOAuthSharp.cs
+++ /dev/null
@@ -1,177 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Security.Cryptography;
-using System.Text;
-
-namespace DankMemes.GPSOAuthSharp
-{
-    // gpsoauth:__init__.py
-    // URL: https://github.com/simon-weber/gpsoauth/blob/master/gpsoauth/__init__.py
-    public class GPSOAuthClient
-    {
-        static string b64Key = "AAAAgMom/1a/v0lblO2Ubrt60J2gcuXSljGFQXgcyZWveWLEwo6prwgi3" +
-            "iJIZdodyhKZQrNWp5nKJ3srRXcUW+F1BD3baEVGcmEgqaLZUNBjm057pK" +
-            "RI16kB0YppeGx5qIQ5QjKzsR8ETQbKLNWgRY0QRNVz34kMJR3P/LgHax/" +
-            "6rmf5AAAAAwEAAQ==";
-        static RSAParameters androidKey = GoogleKeyUtils.KeyFromB64(b64Key);
-
-        static string version = "0.0.5";
-        static string authUrl = "https://android.clients.google.com/auth";
-        static string userAgent = "GPSOAuthSharp/" + version;
-
-        private string email;
-        private string password;
-
-        public GPSOAuthClient(string email, string password)
-        {
-            this.email = email;
-            this.password = password;
-        }
-
-        // _perform_auth_request
-        private Dictionary<string, string> PerformAuthRequest(Dictionary<string, string> data)
-        {
-            NameValueCollection nvc = new NameValueCollection();
-            foreach (var kvp in data)
-            {
-                nvc.Add(kvp.Key.ToString(), kvp.Value.ToString());
-            }
-            using (WebClient client = new WebClient())
-            {
-                client.Headers.Add(HttpRequestHeader.UserAgent, userAgent);
-                string result;
-                try
-                {
-                    byte[] response = client.UploadValues(authUrl, nvc);
-                    result = Encoding.UTF8.GetString(response);
-                }
-                catch (WebException e)
-                {
-                    result = new StreamReader(e.Response.GetResponseStream()).ReadToEnd();
-                }
-                return GoogleKeyUtils.ParseAuthResponse(result);
-            }
-        }
-
-        // perform_master_login
-        public Dictionary<string, string> PerformMasterLogin(string service = "ac2dm",
-            string deviceCountry = "us", string operatorCountry = "us", string lang = "en", int sdkVersion = 21)
-        {
-            string signature = GoogleKeyUtils.CreateSignature(email, password, androidKey);
-            var dict = new Dictionary<string, string> {
-                { "accountType", "HOSTED_OR_GOOGLE" },
-                { "Email", email },
-                { "has_permission", 1.ToString() },
-                { "add_account", 1.ToString() },
-                { "EncryptedPasswd",  signature},
-                { "service", service },
-                { "source", "android" },
-                { "device_country", deviceCountry },
-                { "operatorCountry", operatorCountry },
-                { "lang", lang },
-                { "sdk_version", sdkVersion.ToString() }
-            };
-            return PerformAuthRequest(dict);
-        }
-
-        // perform_oauth
-        public Dictionary<string, string> PerformOAuth(string masterToken, string service, string app, string clientSig,
-            string deviceCountry = "us", string operatorCountry = "us", string lang = "en", int sdkVersion = 21)
-        {
-            var dict = new Dictionary<string, string> {
-                { "accountType", "HOSTED_OR_GOOGLE" },
-                { "Email", email },
-                { "has_permission", 1.ToString() },
-                { "EncryptedPasswd",  masterToken},
-                { "service", service },
-                { "source", "android" },
-                { "app", app },
-                { "client_sig", clientSig },
-                { "device_country", deviceCountry },
-                { "operatorCountry", operatorCountry },
-                { "lang", lang },
-                { "sdk_version", sdkVersion.ToString() }
-            };
-            return PerformAuthRequest(dict);
-        }
-    }
-
-    // gpsoauth:google.py
-    // URL: https://github.com/simon-weber/gpsoauth/blob/master/gpsoauth/google.py
-    class GoogleKeyUtils
-    {
-        // key_from_b64
-        // BitConverter has different endianness, hence the Reverse()
-        public static RSAParameters KeyFromB64(string b64Key)
-        {
-            byte[] decoded = Convert.FromBase64String(b64Key);
-            int modLength = BitConverter.ToInt32(decoded.Take(4).Reverse().ToArray(), 0);
-            byte[] mod = decoded.Skip(4).Take(modLength).ToArray();
-            int expLength = BitConverter.ToInt32(decoded.Skip(modLength + 4).Take(4).Reverse().ToArray(), 0);
-            byte[] exponent = decoded.Skip(modLength + 8).Take(expLength).ToArray();
-            RSAParameters rsaKeyInfo = new RSAParameters();
-            rsaKeyInfo.Modulus = mod;
-            rsaKeyInfo.Exponent = exponent;
-            return rsaKeyInfo;
-        }
-
-        // key_to_struct
-        // Python version returns a string, but we use byte[] to get the same results
-        public static byte[] KeyToStruct(RSAParameters key)
-        {
-            byte[] modLength = { 0x00, 0x00, 0x00, 0x80 };
-            byte[] mod = key.Modulus;
-            byte[] expLength = { 0x00, 0x00, 0x00, 0x03 };
-            byte[] exponent = key.Exponent;
-            return DataTypeUtils.CombineBytes(modLength, mod, expLength, exponent);
-        }
-
-        // parse_auth_response
-        public static Dictionary<string, string> ParseAuthResponse(string text)
-        {
-            Dictionary<string, string> responseData = new Dictionary<string, string>();
-            foreach (string line in text.Split(new string[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries))
-            {
-                string[] parts = line.Split('=');
-                responseData.Add(parts[0], parts[1]);
-            }
-            return responseData;
-        }
-
-        // signature
-        public static string CreateSignature(string email, string password, RSAParameters key)
-        {
-            RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
-            rsa.ImportParameters(key);
-            SHA1 sha1 = SHA1.Create();
-            byte[] prefix = { 0x00 };
-            byte[] hash = sha1.ComputeHash(GoogleKeyUtils.KeyToStruct(key)).Take(4).ToArray();
-            byte[] encrypted = rsa.Encrypt(Encoding.UTF8.GetBytes(email + "\x00" + password), true);
-            return DataTypeUtils.UrlSafeBase64(DataTypeUtils.CombineBytes(prefix, hash, encrypted));
-        }
-    }
-
-    class DataTypeUtils
-    {
-        public static string UrlSafeBase64(byte[] byteArray)
-        {
-            return Convert.ToBase64String(byteArray).Replace('+', '-').Replace('/', '_');
-        }
-
-        public static byte[] CombineBytes(params byte[][] arrays)
-        {
-            byte[] rv = new byte[arrays.Sum(a => a.Length)];
-            int offset = 0;
-            foreach (byte[] array in arrays)
-            {
-                Buffer.BlockCopy(array, 0, rv, offset, array.Length);
-                offset += array.Length;
-            }
-            return rv;
-        }
-    }
-}
diff --git a/PokemonGo/RocketAPI/GeneratedCode/Payloads.cs b/PokemonGo/RocketAPI/GeneratedCode/Payloads.cs
index 388738d..589c206 100644
--- a/PokemonGo/RocketAPI/GeneratedCode/Payloads.cs
+++ b/PokemonGo/RocketAPI/GeneratedCode/Payloads.cs
@@ -495,7 +495,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                     "dEFQSS5HZW5lcmF0ZWRDb2RlLlBva2Vtb24SEgoKRXhwQXdhcmRlZBgDIAEo",
                     "BRIUCgxDYW5keUF3YXJkZWQYBCABKAViBnByb3RvMw=="));
             descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
-                new pbr::FileDescriptor[] {global::AllEnum.AllEnumReflection.Descriptor,},
+                new pbr::FileDescriptor[] { global::AllEnum.AllEnumReflection.Descriptor, },
                 new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[]
                 {
                     new pbr::GeneratedClrTypeInfo(typeof(global::PokemonGo.RocketAPI.GeneratedCode.GetPlayerResponse),
@@ -1135,19 +1135,19 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        Unknown1 = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Unknown1 = input.ReadInt32();
+                            break;
+                        }
                     case 18:
-                    {
-                        if (profile_ == null)
                         {
-                            profile_ = new global::PokemonGo.RocketAPI.GeneratedCode.Profile();
+                            if (profile_ == null)
+                            {
+                                profile_ = new global::PokemonGo.RocketAPI.GeneratedCode.Profile();
+                            }
+                            input.ReadMessage(profile_);
+                            break;
                         }
-                        input.ReadMessage(profile_);
-                        break;
-                    }
                 }
             }
         }
@@ -1373,7 +1373,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Team != 0)
             {
                 output.WriteRawTag(40);
-                output.WriteEnum((int) Team);
+                output.WriteEnum((int)Team);
             }
             if (Tutorial.Length != 0)
             {
@@ -1426,7 +1426,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (Team != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Team);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Team);
             }
             if (Tutorial.Length != 0)
             {
@@ -1528,68 +1528,68 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        CreationTime = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            CreationTime = input.ReadInt64();
+                            break;
+                        }
                     case 18:
-                    {
-                        Username = input.ReadString();
-                        break;
-                    }
+                        {
+                            Username = input.ReadString();
+                            break;
+                        }
                     case 40:
-                    {
-                        team_ = (global::AllEnum.TeamColor) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            team_ = (global::AllEnum.TeamColor)input.ReadEnum();
+                            break;
+                        }
                     case 58:
-                    {
-                        Tutorial = input.ReadBytes();
-                        break;
-                    }
+                        {
+                            Tutorial = input.ReadBytes();
+                            break;
+                        }
                     case 66:
-                    {
-                        if (avatar_ == null)
                         {
-                            avatar_ = new global::PokemonGo.RocketAPI.GeneratedCode.AvatarDetails();
+                            if (avatar_ == null)
+                            {
+                                avatar_ = new global::PokemonGo.RocketAPI.GeneratedCode.AvatarDetails();
+                            }
+                            input.ReadMessage(avatar_);
+                            break;
                         }
-                        input.ReadMessage(avatar_);
-                        break;
-                    }
                     case 72:
-                    {
-                        PokeStorage = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            PokeStorage = input.ReadInt32();
+                            break;
+                        }
                     case 80:
-                    {
-                        ItemStorage = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            ItemStorage = input.ReadInt32();
+                            break;
+                        }
                     case 90:
-                    {
-                        if (dailyBonus_ == null)
                         {
-                            dailyBonus_ = new global::PokemonGo.RocketAPI.GeneratedCode.DailyBonus();
+                            if (dailyBonus_ == null)
+                            {
+                                dailyBonus_ = new global::PokemonGo.RocketAPI.GeneratedCode.DailyBonus();
+                            }
+                            input.ReadMessage(dailyBonus_);
+                            break;
                         }
-                        input.ReadMessage(dailyBonus_);
-                        break;
-                    }
                     case 98:
-                    {
-                        Unknown12 = input.ReadBytes();
-                        break;
-                    }
+                        {
+                            Unknown12 = input.ReadBytes();
+                            break;
+                        }
                     case 106:
-                    {
-                        Unknown13 = input.ReadBytes();
-                        break;
-                    }
+                        {
+                            Unknown13 = input.ReadBytes();
+                            break;
+                        }
                     case 114:
-                    {
-                        currency_.AddEntriesFrom(input, _repeated_currency_codec);
-                        break;
-                    }
+                        {
+                            currency_.AddEntriesFrom(input, _repeated_currency_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -1752,15 +1752,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        NextCollectTimestampMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            NextCollectTimestampMs = input.ReadInt64();
+                            break;
+                        }
                     case 16:
-                    {
-                        NextDefenderBonusCollectTimestampMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            NextDefenderBonusCollectTimestampMs = input.ReadInt64();
+                            break;
+                        }
                 }
             }
         }
@@ -1914,15 +1914,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        Type = input.ReadString();
-                        break;
-                    }
+                        {
+                            Type = input.ReadString();
+                            break;
+                        }
                     case 16:
-                    {
-                        Amount = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Amount = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -2126,25 +2126,25 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 16:
-                    {
-                        Unknown2 = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Unknown2 = input.ReadInt32();
+                            break;
+                        }
                     case 24:
-                    {
-                        Unknown3 = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Unknown3 = input.ReadInt32();
+                            break;
+                        }
                     case 72:
-                    {
-                        Unknown9 = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Unknown9 = input.ReadInt32();
+                            break;
+                        }
                     case 80:
-                    {
-                        Unknown10 = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Unknown10 = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -2275,10 +2275,10 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        Hash = input.ReadString();
-                        break;
-                    }
+                        {
+                            Hash = input.ReadString();
+                            break;
+                        }
                 }
             }
         }
@@ -2435,19 +2435,19 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        Success = input.ReadBool();
-                        break;
-                    }
+                        {
+                            Success = input.ReadBool();
+                            break;
+                        }
                     case 18:
-                    {
-                        if (inventoryDelta_ == null)
                         {
-                            inventoryDelta_ = new global::PokemonGo.RocketAPI.GeneratedCode.InventoryDelta();
+                            if (inventoryDelta_ == null)
+                            {
+                                inventoryDelta_ = new global::PokemonGo.RocketAPI.GeneratedCode.InventoryDelta();
+                            }
+                            input.ReadMessage(inventoryDelta_);
+                            break;
                         }
-                        input.ReadMessage(inventoryDelta_);
-                        break;
-                    }
                 }
             }
         }
@@ -2621,20 +2621,20 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        OriginalTimestampMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            OriginalTimestampMs = input.ReadInt64();
+                            break;
+                        }
                     case 16:
-                    {
-                        NewTimestampMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            NewTimestampMs = input.ReadInt64();
+                            break;
+                        }
                     case 26:
-                    {
-                        inventoryItems_.AddEntriesFrom(input, _repeated_inventoryItems_codec);
-                        break;
-                    }
+                        {
+                            inventoryItems_.AddEntriesFrom(input, _repeated_inventoryItems_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -2818,24 +2818,24 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        ModifiedTimestampMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            ModifiedTimestampMs = input.ReadInt64();
+                            break;
+                        }
                     case 16:
-                    {
-                        DeletedItemKey = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            DeletedItemKey = input.ReadInt64();
+                            break;
+                        }
                     case 26:
-                    {
-                        if (inventoryItemData_ == null)
                         {
-                            inventoryItemData_ = new global::PokemonGo.RocketAPI.GeneratedCode.InventoryItemData();
+                            if (inventoryItemData_ == null)
+                            {
+                                inventoryItemData_ = new global::PokemonGo.RocketAPI.GeneratedCode.InventoryItemData();
+                            }
+                            input.ReadMessage(inventoryItemData_);
+                            break;
                         }
-                        input.ReadMessage(inventoryItemData_);
-                        break;
-                    }
                 }
             }
         }
@@ -3391,95 +3391,95 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        if (pokemon_ == null)
                         {
-                            pokemon_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonData();
+                            if (pokemon_ == null)
+                            {
+                                pokemon_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonData();
+                            }
+                            input.ReadMessage(pokemon_);
+                            break;
                         }
-                        input.ReadMessage(pokemon_);
-                        break;
-                    }
                     case 18:
-                    {
-                        if (item_ == null)
                         {
-                            item_ = new global::PokemonGo.RocketAPI.GeneratedCode.Item();
+                            if (item_ == null)
+                            {
+                                item_ = new global::PokemonGo.RocketAPI.GeneratedCode.Item();
+                            }
+                            input.ReadMessage(item_);
+                            break;
                         }
-                        input.ReadMessage(item_);
-                        break;
-                    }
                     case 26:
-                    {
-                        if (pokedexEntry_ == null)
                         {
-                            pokedexEntry_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokedexEntry();
+                            if (pokedexEntry_ == null)
+                            {
+                                pokedexEntry_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokedexEntry();
+                            }
+                            input.ReadMessage(pokedexEntry_);
+                            break;
                         }
-                        input.ReadMessage(pokedexEntry_);
-                        break;
-                    }
                     case 34:
-                    {
-                        if (playerStats_ == null)
                         {
-                            playerStats_ = new global::PokemonGo.RocketAPI.GeneratedCode.PlayerStats();
+                            if (playerStats_ == null)
+                            {
+                                playerStats_ = new global::PokemonGo.RocketAPI.GeneratedCode.PlayerStats();
+                            }
+                            input.ReadMessage(playerStats_);
+                            break;
                         }
-                        input.ReadMessage(playerStats_);
-                        break;
-                    }
                     case 42:
-                    {
-                        if (playerCurrency_ == null)
                         {
-                            playerCurrency_ = new global::PokemonGo.RocketAPI.GeneratedCode.PlayerCurrency();
+                            if (playerCurrency_ == null)
+                            {
+                                playerCurrency_ = new global::PokemonGo.RocketAPI.GeneratedCode.PlayerCurrency();
+                            }
+                            input.ReadMessage(playerCurrency_);
+                            break;
                         }
-                        input.ReadMessage(playerCurrency_);
-                        break;
-                    }
                     case 50:
-                    {
-                        if (playerCamera_ == null)
                         {
-                            playerCamera_ = new global::PokemonGo.RocketAPI.GeneratedCode.PlayerCamera();
+                            if (playerCamera_ == null)
+                            {
+                                playerCamera_ = new global::PokemonGo.RocketAPI.GeneratedCode.PlayerCamera();
+                            }
+                            input.ReadMessage(playerCamera_);
+                            break;
                         }
-                        input.ReadMessage(playerCamera_);
-                        break;
-                    }
                     case 58:
-                    {
-                        if (inventoryUpgrades_ == null)
                         {
-                            inventoryUpgrades_ = new global::PokemonGo.RocketAPI.GeneratedCode.InventoryUpgrades();
+                            if (inventoryUpgrades_ == null)
+                            {
+                                inventoryUpgrades_ = new global::PokemonGo.RocketAPI.GeneratedCode.InventoryUpgrades();
+                            }
+                            input.ReadMessage(inventoryUpgrades_);
+                            break;
                         }
-                        input.ReadMessage(inventoryUpgrades_);
-                        break;
-                    }
                     case 66:
-                    {
-                        if (appliedItems_ == null)
                         {
-                            appliedItems_ = new global::PokemonGo.RocketAPI.GeneratedCode.AppliedItems();
+                            if (appliedItems_ == null)
+                            {
+                                appliedItems_ = new global::PokemonGo.RocketAPI.GeneratedCode.AppliedItems();
+                            }
+                            input.ReadMessage(appliedItems_);
+                            break;
                         }
-                        input.ReadMessage(appliedItems_);
-                        break;
-                    }
                     case 74:
-                    {
-                        if (eggIncubators_ == null)
                         {
-                            eggIncubators_ = new global::PokemonGo.RocketAPI.GeneratedCode.EggIncubators();
+                            if (eggIncubators_ == null)
+                            {
+                                eggIncubators_ = new global::PokemonGo.RocketAPI.GeneratedCode.EggIncubators();
+                            }
+                            input.ReadMessage(eggIncubators_);
+                            break;
                         }
-                        input.ReadMessage(eggIncubators_);
-                        break;
-                    }
                     case 82:
-                    {
-                        if (pokemonFamily_ == null)
                         {
-                            pokemonFamily_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonFamily();
+                            if (pokemonFamily_ == null)
+                            {
+                                pokemonFamily_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonFamily();
+                            }
+                            input.ReadMessage(pokemonFamily_);
+                            break;
                         }
-                        input.ReadMessage(pokemonFamily_);
-                        break;
-                    }
                 }
             }
         }
@@ -3930,7 +3930,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (PokemonType != 0)
             {
                 output.WriteRawTag(16);
-                output.WriteEnum((int) PokemonType);
+                output.WriteEnum((int)PokemonType);
             }
             if (Cp != 0)
             {
@@ -3950,12 +3950,12 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Move1 != 0)
             {
                 output.WriteRawTag(48);
-                output.WriteEnum((int) Move1);
+                output.WriteEnum((int)Move1);
             }
             if (Move2 != 0)
             {
                 output.WriteRawTag(56);
-                output.WriteEnum((int) Move2);
+                output.WriteEnum((int)Move2);
             }
             if (DeployedFortId != 0)
             {
@@ -4083,7 +4083,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (PokemonType != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PokemonType);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)PokemonType);
             }
             if (Cp != 0)
             {
@@ -4099,11 +4099,11 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (Move1 != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Move1);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Move1);
             }
             if (Move2 != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Move2);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Move2);
             }
             if (DeployedFortId != 0)
             {
@@ -4339,155 +4339,155 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        Id = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Id = input.ReadInt32();
+                            break;
+                        }
                     case 16:
-                    {
-                        pokemonType_ = (global::AllEnum.PokemonId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            pokemonType_ = (global::AllEnum.PokemonId)input.ReadEnum();
+                            break;
+                        }
                     case 24:
-                    {
-                        Cp = input.ReadInt32();
-                        break;
-                    }
-                    case 32:
-                    {
-                        Stamina = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Cp = input.ReadInt32();
+                            break;
+                        }
+                    case 32:
+                        {
+                            Stamina = input.ReadInt32();
+                            break;
+                        }
                     case 40:
-                    {
-                        StaminaMax = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            StaminaMax = input.ReadInt32();
+                            break;
+                        }
                     case 48:
-                    {
-                        move1_ = (global::AllEnum.PokemonMove) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            move1_ = (global::AllEnum.PokemonMove)input.ReadEnum();
+                            break;
+                        }
                     case 56:
-                    {
-                        move2_ = (global::AllEnum.PokemonMove) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            move2_ = (global::AllEnum.PokemonMove)input.ReadEnum();
+                            break;
+                        }
                     case 64:
-                    {
-                        DeployedFortId = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            DeployedFortId = input.ReadInt32();
+                            break;
+                        }
                     case 74:
-                    {
-                        OwnerName = input.ReadString();
-                        break;
-                    }
+                        {
+                            OwnerName = input.ReadString();
+                            break;
+                        }
                     case 80:
-                    {
-                        IsEgg = input.ReadBool();
-                        break;
-                    }
+                        {
+                            IsEgg = input.ReadBool();
+                            break;
+                        }
                     case 88:
-                    {
-                        EggKmWalkedTarget = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            EggKmWalkedTarget = input.ReadInt32();
+                            break;
+                        }
                     case 96:
-                    {
-                        EggKmWalkedStart = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            EggKmWalkedStart = input.ReadInt32();
+                            break;
+                        }
                     case 112:
-                    {
-                        Origin = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Origin = input.ReadInt32();
+                            break;
+                        }
                     case 125:
-                    {
-                        HeightM = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            HeightM = input.ReadFloat();
+                            break;
+                        }
                     case 133:
-                    {
-                        WeightKg = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            WeightKg = input.ReadFloat();
+                            break;
+                        }
                     case 136:
-                    {
-                        IndividualAttack = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            IndividualAttack = input.ReadInt32();
+                            break;
+                        }
                     case 144:
-                    {
-                        IndividualDefense = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            IndividualDefense = input.ReadInt32();
+                            break;
+                        }
                     case 152:
-                    {
-                        IndividualStamina = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            IndividualStamina = input.ReadInt32();
+                            break;
+                        }
                     case 160:
-                    {
-                        CpMultiplier = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            CpMultiplier = input.ReadInt32();
+                            break;
+                        }
                     case 168:
-                    {
-                        Pokeball = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Pokeball = input.ReadInt32();
+                            break;
+                        }
                     case 176:
-                    {
-                        CapturedCellId = input.ReadUInt64();
-                        break;
-                    }
+                        {
+                            CapturedCellId = input.ReadUInt64();
+                            break;
+                        }
                     case 184:
-                    {
-                        BattlesAttacked = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BattlesAttacked = input.ReadInt32();
+                            break;
+                        }
                     case 192:
-                    {
-                        BattlesDefended = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BattlesDefended = input.ReadInt32();
+                            break;
+                        }
                     case 200:
-                    {
-                        EggIncubatorId = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            EggIncubatorId = input.ReadInt32();
+                            break;
+                        }
                     case 208:
-                    {
-                        CreationTimeMs = input.ReadUInt64();
-                        break;
-                    }
+                        {
+                            CreationTimeMs = input.ReadUInt64();
+                            break;
+                        }
                     case 216:
-                    {
-                        NumUpgrades = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            NumUpgrades = input.ReadInt32();
+                            break;
+                        }
                     case 224:
-                    {
-                        AdditionalCpMultiplier = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            AdditionalCpMultiplier = input.ReadInt32();
+                            break;
+                        }
                     case 232:
-                    {
-                        Favorite = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Favorite = input.ReadInt32();
+                            break;
+                        }
                     case 242:
-                    {
-                        Nickname = input.ReadString();
-                        break;
-                    }
+                        {
+                            Nickname = input.ReadString();
+                            break;
+                        }
                     case 248:
-                    {
-                        FromFort = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            FromFort = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -4629,7 +4629,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Item_ != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) Item_);
+                output.WriteEnum((int)Item_);
             }
             if (Count != 0)
             {
@@ -4648,7 +4648,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (Item_ != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Item_);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Item_);
             }
             if (Count != 0)
             {
@@ -4692,20 +4692,20 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        item_ = (global::AllEnum.ItemType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            item_ = (global::AllEnum.ItemType)input.ReadEnum();
+                            break;
+                        }
                     case 16:
-                    {
-                        Count = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Count = input.ReadInt32();
+                            break;
+                        }
                     case 24:
-                    {
-                        Unseen = input.ReadBool();
-                        break;
-                    }
+                        {
+                            Unseen = input.ReadBool();
+                            break;
+                        }
                 }
             }
         }
@@ -4935,30 +4935,30 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        PokedexEntryNumber = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            PokedexEntryNumber = input.ReadInt32();
+                            break;
+                        }
                     case 16:
-                    {
-                        TimesEncountered = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            TimesEncountered = input.ReadInt32();
+                            break;
+                        }
                     case 24:
-                    {
-                        TimesCaptured = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            TimesCaptured = input.ReadInt32();
+                            break;
+                        }
                     case 32:
-                    {
-                        EvolutionStonePieces = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            EvolutionStonePieces = input.ReadInt32();
+                            break;
+                        }
                     case 40:
-                    {
-                        EvolutionStones = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            EvolutionStones = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -5643,120 +5643,120 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        Level = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Level = input.ReadInt32();
+                            break;
+                        }
                     case 16:
-                    {
-                        Experience = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            Experience = input.ReadInt64();
+                            break;
+                        }
                     case 24:
-                    {
-                        PrevLevelXp = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            PrevLevelXp = input.ReadInt64();
+                            break;
+                        }
                     case 32:
-                    {
-                        NextLevelXp = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            NextLevelXp = input.ReadInt64();
+                            break;
+                        }
                     case 45:
-                    {
-                        KmWalked = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            KmWalked = input.ReadFloat();
+                            break;
+                        }
                     case 48:
-                    {
-                        PokemonsEncountered = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            PokemonsEncountered = input.ReadInt32();
+                            break;
+                        }
                     case 56:
-                    {
-                        UniquePokedexEntries = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            UniquePokedexEntries = input.ReadInt32();
+                            break;
+                        }
                     case 64:
-                    {
-                        PokemonsCaptured = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            PokemonsCaptured = input.ReadInt32();
+                            break;
+                        }
                     case 72:
-                    {
-                        Evolutions = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Evolutions = input.ReadInt32();
+                            break;
+                        }
                     case 80:
-                    {
-                        PokeStopVisits = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            PokeStopVisits = input.ReadInt32();
+                            break;
+                        }
                     case 88:
-                    {
-                        PokeballsThrown = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            PokeballsThrown = input.ReadInt32();
+                            break;
+                        }
                     case 96:
-                    {
-                        EggsHatched = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            EggsHatched = input.ReadInt32();
+                            break;
+                        }
                     case 104:
-                    {
-                        BigMagikarpCaught = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BigMagikarpCaught = input.ReadInt32();
+                            break;
+                        }
                     case 112:
-                    {
-                        BattleAttackWon = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BattleAttackWon = input.ReadInt32();
+                            break;
+                        }
                     case 120:
-                    {
-                        BattleAttackTotal = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BattleAttackTotal = input.ReadInt32();
+                            break;
+                        }
                     case 128:
-                    {
-                        BattleDefendedWon = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BattleDefendedWon = input.ReadInt32();
+                            break;
+                        }
                     case 136:
-                    {
-                        BattleTrainingWon = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BattleTrainingWon = input.ReadInt32();
+                            break;
+                        }
                     case 144:
-                    {
-                        BattleTrainingTotal = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BattleTrainingTotal = input.ReadInt32();
+                            break;
+                        }
                     case 152:
-                    {
-                        PrestigeRaisedTotal = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            PrestigeRaisedTotal = input.ReadInt32();
+                            break;
+                        }
                     case 160:
-                    {
-                        PrestigeDroppedTotal = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            PrestigeDroppedTotal = input.ReadInt32();
+                            break;
+                        }
                     case 168:
-                    {
-                        PokemonDeployed = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            PokemonDeployed = input.ReadInt32();
+                            break;
+                        }
                     case 178:
-                    {
-                        PokemonCaughtByType = input.ReadBytes();
-                        break;
-                    }
+                        {
+                            PokemonCaughtByType = input.ReadBytes();
+                            break;
+                        }
                     case 184:
-                    {
-                        SmallRattataCaught = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            SmallRattataCaught = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -5906,10 +5906,10 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        Gems = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Gems = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -6037,10 +6037,10 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        IsDefaultCamera = input.ReadBool();
-                        break;
-                    }
+                        {
+                            IsDefaultCamera = input.ReadBool();
+                            break;
+                        }
                 }
             }
         }
@@ -6162,10 +6162,10 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        inventoryUpgrades_.AddEntriesFrom(input, _repeated_inventoryUpgrades_codec);
-                        break;
-                    }
+                        {
+                            inventoryUpgrades_.AddEntriesFrom(input, _repeated_inventoryUpgrades_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -6280,12 +6280,12 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Item != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) Item);
+                output.WriteEnum((int)Item);
             }
             if (UpgradeType != 0)
             {
                 output.WriteRawTag(16);
-                output.WriteEnum((int) UpgradeType);
+                output.WriteEnum((int)UpgradeType);
             }
             if (AdditionalStorage != 0)
             {
@@ -6299,11 +6299,11 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (Item != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Item);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Item);
             }
             if (UpgradeType != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) UpgradeType);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)UpgradeType);
             }
             if (AdditionalStorage != 0)
             {
@@ -6343,20 +6343,20 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        item_ = (global::AllEnum.ItemType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            item_ = (global::AllEnum.ItemType)input.ReadEnum();
+                            break;
+                        }
                     case 16:
-                    {
-                        upgradeType_ = (global::AllEnum.InventoryUpgradeType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            upgradeType_ = (global::AllEnum.InventoryUpgradeType)input.ReadEnum();
+                            break;
+                        }
                     case 24:
-                    {
-                        AdditionalStorage = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            AdditionalStorage = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -6490,14 +6490,14 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 34:
-                    {
-                        if (item_ == null)
                         {
-                            item_ = new global::PokemonGo.RocketAPI.GeneratedCode.AppliedItem();
+                            if (item_ == null)
+                            {
+                                item_ = new global::PokemonGo.RocketAPI.GeneratedCode.AppliedItem();
+                            }
+                            input.ReadMessage(item_);
+                            break;
                         }
-                        input.ReadMessage(item_);
-                        break;
-                    }
                 }
             }
         }
@@ -6624,12 +6624,12 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (ItemType != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) ItemType);
+                output.WriteEnum((int)ItemType);
             }
             if (ItemTypeCategory != 0)
             {
                 output.WriteRawTag(16);
-                output.WriteEnum((int) ItemTypeCategory);
+                output.WriteEnum((int)ItemTypeCategory);
             }
             if (ExpireMs != 0L)
             {
@@ -6648,11 +6648,11 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (ItemType != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ItemType);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)ItemType);
             }
             if (ItemTypeCategory != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ItemTypeCategory);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)ItemTypeCategory);
             }
             if (ExpireMs != 0L)
             {
@@ -6700,25 +6700,25 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        itemType_ = (global::AllEnum.ItemId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            itemType_ = (global::AllEnum.ItemId)input.ReadEnum();
+                            break;
+                        }
                     case 16:
-                    {
-                        itemTypeCategory_ = (global::AllEnum.ItemType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            itemTypeCategory_ = (global::AllEnum.ItemType)input.ReadEnum();
+                            break;
+                        }
                     case 24:
-                    {
-                        ExpireMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            ExpireMs = input.ReadInt64();
+                            break;
+                        }
                     case 32:
-                    {
-                        AppliedMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            AppliedMs = input.ReadInt64();
+                            break;
+                        }
                 }
             }
         }
@@ -6853,14 +6853,14 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        if (eggIncubator_ == null)
                         {
-                            eggIncubator_ = new global::PokemonGo.RocketAPI.GeneratedCode.EggIncubator();
+                            if (eggIncubator_ == null)
+                            {
+                                eggIncubator_ = new global::PokemonGo.RocketAPI.GeneratedCode.EggIncubator();
+                            }
+                            input.ReadMessage(eggIncubator_);
+                            break;
                         }
-                        input.ReadMessage(eggIncubator_);
-                        break;
-                    }
                 }
             }
         }
@@ -7031,12 +7031,12 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (ItemType != 0)
             {
                 output.WriteRawTag(16);
-                output.WriteEnum((int) ItemType);
+                output.WriteEnum((int)ItemType);
             }
             if (IncubatorType != 0)
             {
                 output.WriteRawTag(24);
-                output.WriteEnum((int) IncubatorType);
+                output.WriteEnum((int)IncubatorType);
             }
             if (UsesRemaining != 0)
             {
@@ -7069,11 +7069,11 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (ItemType != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ItemType);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)ItemType);
             }
             if (IncubatorType != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) IncubatorType);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)IncubatorType);
             }
             if (UsesRemaining != 0)
             {
@@ -7141,40 +7141,40 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        ItemId = input.ReadString();
-                        break;
-                    }
+                        {
+                            ItemId = input.ReadString();
+                            break;
+                        }
                     case 16:
-                    {
-                        itemType_ = (global::AllEnum.ItemType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            itemType_ = (global::AllEnum.ItemType)input.ReadEnum();
+                            break;
+                        }
                     case 24:
-                    {
-                        incubatorType_ = (global::AllEnum.EggIncubatorType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            incubatorType_ = (global::AllEnum.EggIncubatorType)input.ReadEnum();
+                            break;
+                        }
                     case 32:
-                    {
-                        UsesRemaining = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            UsesRemaining = input.ReadInt32();
+                            break;
+                        }
                     case 40:
-                    {
-                        PokemonId = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            PokemonId = input.ReadInt64();
+                            break;
+                        }
                     case 49:
-                    {
-                        StartKmWalked = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            StartKmWalked = input.ReadDouble();
+                            break;
+                        }
                     case 57:
-                    {
-                        TargetKmWalked = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            TargetKmWalked = input.ReadDouble();
+                            break;
+                        }
                 }
             }
         }
@@ -7283,7 +7283,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (FamilyId != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) FamilyId);
+                output.WriteEnum((int)FamilyId);
             }
             if (Candy != 0)
             {
@@ -7297,7 +7297,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (FamilyId != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) FamilyId);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)FamilyId);
             }
             if (Candy != 0)
             {
@@ -7333,15 +7333,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        familyId_ = (global::AllEnum.PokemonFamilyId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            familyId_ = (global::AllEnum.PokemonFamilyId)input.ReadEnum();
+                            break;
+                        }
                     case 16:
-                    {
-                        Candy = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Candy = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -7545,25 +7545,25 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        CellId = input.ReadBytes();
-                        break;
-                    }
+                        {
+                            CellId = input.ReadBytes();
+                            break;
+                        }
                     case 18:
-                    {
-                        SinceTimestampMs = input.ReadBytes();
-                        break;
-                    }
+                        {
+                            SinceTimestampMs = input.ReadBytes();
+                            break;
+                        }
                     case 25:
-                    {
-                        Latitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Latitude = input.ReadDouble();
+                            break;
+                        }
                     case 33:
-                    {
-                        Longitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Longitude = input.ReadDouble();
+                            break;
+                        }
                 }
             }
         }
@@ -7675,7 +7675,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Status != 0)
             {
                 output.WriteRawTag(16);
-                output.WriteEnum((int) Status);
+                output.WriteEnum((int)Status);
             }
         }

@@ -7685,7 +7685,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             size += mapCells_.CalculateSize(_repeated_mapCells_codec);
             if (Status != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Status);
             }
             return size;
         }
@@ -7714,16 +7714,16 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        mapCells_.AddEntriesFrom(input, _repeated_mapCells_codec);
-                        break;
-                    }
+                        {
+                            mapCells_.AddEntriesFrom(input, _repeated_mapCells_codec);
+                            break;
+                        }
                     case 16:
-                    {
-                        status_ = (global::AllEnum.MapObjectsStatus) input.ReadEnum();
-                        break;
-                    }
-                }
+                        {
+                            status_ = (global::AllEnum.MapObjectsStatus)input.ReadEnum();
+                            break;
+                        }
+                }
             }
         }

@@ -8070,60 +8070,60 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        S2CellId = input.ReadUInt64();
-                        break;
-                    }
+                        {
+                            S2CellId = input.ReadUInt64();
+                            break;
+                        }
                     case 16:
-                    {
-                        CurrentTimestampMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            CurrentTimestampMs = input.ReadInt64();
+                            break;
+                        }
                     case 26:
-                    {
-                        forts_.AddEntriesFrom(input, _repeated_forts_codec);
-                        break;
-                    }
+                        {
+                            forts_.AddEntriesFrom(input, _repeated_forts_codec);
+                            break;
+                        }
                     case 34:
-                    {
-                        spawnPoints_.AddEntriesFrom(input, _repeated_spawnPoints_codec);
-                        break;
-                    }
+                        {
+                            spawnPoints_.AddEntriesFrom(input, _repeated_spawnPoints_codec);
+                            break;
+                        }
                     case 42:
-                    {
-                        wildPokemons_.AddEntriesFrom(input, _repeated_wildPokemons_codec);
-                        break;
-                    }
+                        {
+                            wildPokemons_.AddEntriesFrom(input, _repeated_wildPokemons_codec);
+                            break;
+                        }
                     case 50:
-                    {
-                        deletedObjects_.AddEntriesFrom(input, _repeated_deletedObjects_codec);
-                        break;
-                    }
+                        {
+                            deletedObjects_.AddEntriesFrom(input, _repeated_deletedObjects_codec);
+                            break;
+                        }
                     case 56:
-                    {
-                        IsTruncatedList = input.ReadBool();
-                        break;
-                    }
+                        {
+                            IsTruncatedList = input.ReadBool();
+                            break;
+                        }
                     case 66:
-                    {
-                        fortSummaries_.AddEntriesFrom(input, _repeated_fortSummaries_codec);
-                        break;
-                    }
+                        {
+                            fortSummaries_.AddEntriesFrom(input, _repeated_fortSummaries_codec);
+                            break;
+                        }
                     case 74:
-                    {
-                        decimatedSpawnPoints_.AddEntriesFrom(input, _repeated_decimatedSpawnPoints_codec);
-                        break;
-                    }
+                        {
+                            decimatedSpawnPoints_.AddEntriesFrom(input, _repeated_decimatedSpawnPoints_codec);
+                            break;
+                        }
                     case 82:
-                    {
-                        catchablePokemons_.AddEntriesFrom(input, _repeated_catchablePokemons_codec);
-                        break;
-                    }
+                        {
+                            catchablePokemons_.AddEntriesFrom(input, _repeated_catchablePokemons_codec);
+                            break;
+                        }
                     case 90:
-                    {
-                        nearbyPokemons_.AddEntriesFrom(input, _repeated_nearbyPokemons_codec);
-                        break;
-                    }
+                        {
+                            nearbyPokemons_.AddEntriesFrom(input, _repeated_nearbyPokemons_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -8442,12 +8442,12 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (OwnedByTeam != 0)
             {
                 output.WriteRawTag(40);
-                output.WriteEnum((int) OwnedByTeam);
+                output.WriteEnum((int)OwnedByTeam);
             }
             if (GuardPokemonId != 0)
             {
                 output.WriteRawTag(48);
-                output.WriteEnum((int) GuardPokemonId);
+                output.WriteEnum((int)GuardPokemonId);
             }
             if (GuardPokemonCp != 0)
             {
@@ -8462,7 +8462,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Type != 0)
             {
                 output.WriteRawTag(72);
-                output.WriteEnum((int) Type);
+                output.WriteEnum((int)Type);
             }
             if (GymPoints != 0L)
             {
@@ -8492,12 +8492,12 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Sponsor != 0)
             {
                 output.WriteRawTag(120);
-                output.WriteEnum((int) Sponsor);
+                output.WriteEnum((int)Sponsor);
             }
             if (RenderingType != 0)
             {
                 output.WriteRawTag(128, 1);
-                output.WriteEnum((int) RenderingType);
+                output.WriteEnum((int)RenderingType);
             }
         }

@@ -8526,15 +8526,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (Type != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Type);
             }
             if (OwnedByTeam != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) OwnedByTeam);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)OwnedByTeam);
             }
             if (GuardPokemonId != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) GuardPokemonId);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)GuardPokemonId);
             }
             if (GuardPokemonCp != 0)
             {
@@ -8554,11 +8554,11 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (Sponsor != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Sponsor);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Sponsor);
             }
             if (RenderingType != 0)
             {
-                size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) RenderingType);
+                size += 2 + pb::CodedOutputStream.ComputeEnumSize((int)RenderingType);
             }
             if (ActiveFortModifier.Length != 0)
             {
@@ -8658,89 +8658,89 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        Id = input.ReadString();
-                        break;
-                    }
+                        {
+                            Id = input.ReadString();
+                            break;
+                        }
                     case 16:
-                    {
-                        LastModifiedTimestampMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            LastModifiedTimestampMs = input.ReadInt64();
+                            break;
+                        }
                     case 25:
-                    {
-                        Latitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Latitude = input.ReadDouble();
+                            break;
+                        }
                     case 33:
-                    {
-                        Longitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Longitude = input.ReadDouble();
+                            break;
+                        }
                     case 40:
-                    {
-                        ownedByTeam_ = (global::AllEnum.TeamColor) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            ownedByTeam_ = (global::AllEnum.TeamColor)input.ReadEnum();
+                            break;
+                        }
                     case 48:
-                    {
-                        guardPokemonId_ = (global::AllEnum.PokemonId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            guardPokemonId_ = (global::AllEnum.PokemonId)input.ReadEnum();
+                            break;
+                        }
                     case 56:
-                    {
-                        GuardPokemonCp = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            GuardPokemonCp = input.ReadInt32();
+                            break;
+                        }
                     case 64:
-                    {
-                        Enabled = input.ReadBool();
-                        break;
-                    }
+                        {
+                            Enabled = input.ReadBool();
+                            break;
+                        }
                     case 72:
-                    {
-                        type_ = (global::AllEnum.FortType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            type_ = (global::AllEnum.FortType)input.ReadEnum();
+                            break;
+                        }
                     case 80:
-                    {
-                        GymPoints = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            GymPoints = input.ReadInt64();
+                            break;
+                        }
                     case 88:
-                    {
-                        IsInBattle = input.ReadBool();
-                        break;
-                    }
+                        {
+                            IsInBattle = input.ReadBool();
+                            break;
+                        }
                     case 98:
-                    {
-                        ActiveFortModifier = input.ReadBytes();
-                        break;
-                    }
+                        {
+                            ActiveFortModifier = input.ReadBytes();
+                            break;
+                        }
                     case 106:
-                    {
-                        if (lureInfo_ == null)
                         {
-                            lureInfo_ = new global::PokemonGo.RocketAPI.GeneratedCode.FortLureInfo();
+                            if (lureInfo_ == null)
+                            {
+                                lureInfo_ = new global::PokemonGo.RocketAPI.GeneratedCode.FortLureInfo();
+                            }
+                            input.ReadMessage(lureInfo_);
+                            break;
                         }
-                        input.ReadMessage(lureInfo_);
-                        break;
-                    }
                     case 112:
-                    {
-                        CooldownCompleteTimestampMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            CooldownCompleteTimestampMs = input.ReadInt64();
+                            break;
+                        }
                     case 120:
-                    {
-                        sponsor_ = (global::AllEnum.FortSponsor) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            sponsor_ = (global::AllEnum.FortSponsor)input.ReadEnum();
+                            break;
+                        }
                     case 128:
-                    {
-                        renderingType_ = (global::AllEnum.FortRenderingType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            renderingType_ = (global::AllEnum.FortRenderingType)input.ReadEnum();
+                            break;
+                        }
                 }
             }
         }
@@ -8892,7 +8892,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (ActivePokemonId != 0)
             {
                 output.WriteRawTag(24);
-                output.WriteEnum((int) ActivePokemonId);
+                output.WriteEnum((int)ActivePokemonId);
             }
             if (LureExpiresTimestampMs != 0L)
             {
@@ -8914,7 +8914,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (ActivePokemonId != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ActivePokemonId);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)ActivePokemonId);
             }
             if (LureExpiresTimestampMs != 0L)
             {
@@ -8958,25 +8958,25 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        FortId = input.ReadString();
-                        break;
-                    }
+                        {
+                            FortId = input.ReadString();
+                            break;
+                        }
                     case 17:
-                    {
-                        Unknown2 = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Unknown2 = input.ReadDouble();
+                            break;
+                        }
                     case 24:
-                    {
-                        activePokemonId_ = (global::AllEnum.PokemonId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            activePokemonId_ = (global::AllEnum.PokemonId)input.ReadEnum();
+                            break;
+                        }
                     case 32:
-                    {
-                        LureExpiresTimestampMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            LureExpiresTimestampMs = input.ReadInt64();
+                            break;
+                        }
                 }
             }
         }
@@ -9132,15 +9132,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 17:
-                    {
-                        Latitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Latitude = input.ReadDouble();
+                            break;
+                        }
                     case 25:
-                    {
-                        Longitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Longitude = input.ReadDouble();
+                            break;
+                        }
                 }
             }
         }
@@ -9344,25 +9344,25 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        FortSummaryId = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            FortSummaryId = input.ReadInt32();
+                            break;
+                        }
                     case 16:
-                    {
-                        LastModifiedTimestampMs = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            LastModifiedTimestampMs = input.ReadInt32();
+                            break;
+                        }
                     case 24:
-                    {
-                        Latitude = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Latitude = input.ReadInt32();
+                            break;
+                        }
                     case 32:
-                    {
-                        Longitude = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Longitude = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -9647,44 +9647,44 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 9:
-                    {
-                        EncounterId = input.ReadFixed64();
-                        break;
-                    }
+                        {
+                            EncounterId = input.ReadFixed64();
+                            break;
+                        }
                     case 16:
-                    {
-                        LastModifiedTimestampMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            LastModifiedTimestampMs = input.ReadInt64();
+                            break;
+                        }
                     case 25:
-                    {
-                        Latitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Latitude = input.ReadDouble();
+                            break;
+                        }
                     case 33:
-                    {
-                        Longitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Longitude = input.ReadDouble();
+                            break;
+                        }
                     case 42:
-                    {
-                        SpawnpointId = input.ReadString();
-                        break;
-                    }
-                    case 58:
-                    {
-                        if (pokemonData_ == null)
                         {
-                            pokemonData_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonData();
+                            SpawnpointId = input.ReadString();
+                            break;
+                        }
+                    case 58:
+                        {
+                            if (pokemonData_ == null)
+                            {
+                                pokemonData_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonData();
+                            }
+                            input.ReadMessage(pokemonData_);
+                            break;
                         }
-                        input.ReadMessage(pokemonData_);
-                        break;
-                    }
                     case 88:
-                    {
-                        TimeTillHiddenMs = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            TimeTillHiddenMs = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -10071,6 +10071,11 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             set { fromFort_ = value; }
         }

+        public float GetIV()
+        {
+            return ((float)(IndividualAttack + IndividualDefense + IndividualStamina) / (45.0f));
+        }
+
         pbr::MessageDescriptor pb::IMessage.Descriptor
         {
             get { return Descriptor; }
@@ -10134,7 +10139,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (PokemonId != 0)
             {
                 output.WriteRawTag(16);
-                output.WriteEnum((int) PokemonId);
+                output.WriteEnum((int)PokemonId);
             }
             if (Cp != 0)
             {
@@ -10154,12 +10159,12 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Move1 != 0)
             {
                 output.WriteRawTag(48);
-                output.WriteEnum((int) Move1);
+                output.WriteEnum((int)Move1);
             }
             if (Move2 != 0)
             {
                 output.WriteRawTag(56);
-                output.WriteEnum((int) Move2);
+                output.WriteEnum((int)Move2);
             }
             if (DeployedFortId != 0)
             {
@@ -10287,7 +10292,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (PokemonId != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PokemonId);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)PokemonId);
             }
             if (Cp != 0)
             {
@@ -10303,11 +10308,11 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (Move1 != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Move1);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Move1);
             }
             if (Move2 != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Move2);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Move2);
             }
             if (DeployedFortId != 0)
             {
@@ -10543,155 +10548,155 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 9:
-                    {
-                        Id = input.ReadFixed64();
-                        break;
-                    }
+                        {
+                            Id = input.ReadFixed64();
+                            break;
+                        }
                     case 16:
-                    {
-                        pokemonId_ = (global::AllEnum.PokemonId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            pokemonId_ = (global::AllEnum.PokemonId)input.ReadEnum();
+                            break;
+                        }
                     case 24:
-                    {
-                        Cp = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Cp = input.ReadInt32();
+                            break;
+                        }
                     case 32:
-                    {
-                        Stamina = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Stamina = input.ReadInt32();
+                            break;
+                        }
                     case 40:
-                    {
-                        StaminaMax = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            StaminaMax = input.ReadInt32();
+                            break;
+                        }
                     case 48:
-                    {
-                        move1_ = (global::AllEnum.PokemonMove) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            move1_ = (global::AllEnum.PokemonMove)input.ReadEnum();
+                            break;
+                        }
                     case 56:
-                    {
-                        move2_ = (global::AllEnum.PokemonMove) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            move2_ = (global::AllEnum.PokemonMove)input.ReadEnum();
+                            break;
+                        }
                     case 64:
-                    {
-                        DeployedFortId = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            DeployedFortId = input.ReadInt32();
+                            break;
+                        }
                     case 74:
-                    {
-                        OwnerName = input.ReadString();
-                        break;
-                    }
+                        {
+                            OwnerName = input.ReadString();
+                            break;
+                        }
                     case 80:
-                    {
-                        IsEgg = input.ReadBool();
-                        break;
-                    }
+                        {
+                            IsEgg = input.ReadBool();
+                            break;
+                        }
                     case 88:
-                    {
-                        EggKmWalkedTarget = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            EggKmWalkedTarget = input.ReadInt32();
+                            break;
+                        }
                     case 96:
-                    {
-                        EggKmWalkedStart = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            EggKmWalkedStart = input.ReadInt32();
+                            break;
+                        }
                     case 112:
-                    {
-                        Origin = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Origin = input.ReadInt32();
+                            break;
+                        }
                     case 125:
-                    {
-                        HeightM = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            HeightM = input.ReadFloat();
+                            break;
+                        }
                     case 133:
-                    {
-                        WeightKg = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            WeightKg = input.ReadFloat();
+                            break;
+                        }
                     case 136:
-                    {
-                        IndividualAttack = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            IndividualAttack = input.ReadInt32();
+                            break;
+                        }
                     case 144:
-                    {
-                        IndividualDefense = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            IndividualDefense = input.ReadInt32();
+                            break;
+                        }
                     case 152:
-                    {
-                        IndividualStamina = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            IndividualStamina = input.ReadInt32();
+                            break;
+                        }
                     case 160:
-                    {
-                        CpMultiplier = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            CpMultiplier = input.ReadInt32();
+                            break;
+                        }
                     case 168:
-                    {
-                        Pokeball = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Pokeball = input.ReadInt32();
+                            break;
+                        }
                     case 176:
-                    {
-                        CapturedCellId = input.ReadUInt64();
-                        break;
-                    }
+                        {
+                            CapturedCellId = input.ReadUInt64();
+                            break;
+                        }
                     case 184:
-                    {
-                        BattlesAttacked = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BattlesAttacked = input.ReadInt32();
+                            break;
+                        }
                     case 192:
-                    {
-                        BattlesDefended = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BattlesDefended = input.ReadInt32();
+                            break;
+                        }
                     case 200:
-                    {
-                        EggIncubatorId = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            EggIncubatorId = input.ReadInt32();
+                            break;
+                        }
                     case 208:
-                    {
-                        CreationTimeMs = input.ReadUInt64();
-                        break;
-                    }
+                        {
+                            CreationTimeMs = input.ReadUInt64();
+                            break;
+                        }
                     case 216:
-                    {
-                        NumUpgrades = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            NumUpgrades = input.ReadInt32();
+                            break;
+                        }
                     case 224:
-                    {
-                        AdditionalCpMultiplier = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            AdditionalCpMultiplier = input.ReadInt32();
+                            break;
+                        }
                     case 232:
-                    {
-                        Favorite = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Favorite = input.ReadInt32();
+                            break;
+                        }
                     case 242:
-                    {
-                        Nickname = input.ReadString();
-                        break;
-                    }
+                        {
+                            Nickname = input.ReadString();
+                            break;
+                        }
                     case 248:
-                    {
-                        FromFort = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            FromFort = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -10884,7 +10889,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (PokemonId != 0)
             {
                 output.WriteRawTag(24);
-                output.WriteEnum((int) PokemonId);
+                output.WriteEnum((int)PokemonId);
             }
             if (ExpirationTimestampMs != 0L)
             {
@@ -10916,7 +10921,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (PokemonId != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PokemonId);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)PokemonId);
             }
             if (ExpirationTimestampMs != 0L)
             {
@@ -10976,35 +10981,35 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        SpawnpointId = input.ReadString();
-                        break;
-                    }
+                        {
+                            SpawnpointId = input.ReadString();
+                            break;
+                        }
                     case 17:
-                    {
-                        EncounterId = input.ReadFixed64();
-                        break;
-                    }
+                        {
+                            EncounterId = input.ReadFixed64();
+                            break;
+                        }
                     case 24:
-                    {
-                        pokemonId_ = (global::AllEnum.PokemonId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            pokemonId_ = (global::AllEnum.PokemonId)input.ReadEnum();
+                            break;
+                        }
                     case 32:
-                    {
-                        ExpirationTimestampMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            ExpirationTimestampMs = input.ReadInt64();
+                            break;
+                        }
                     case 41:
-                    {
-                        Latitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Latitude = input.ReadDouble();
+                            break;
+                        }
                     case 49:
-                    {
-                        Longitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Longitude = input.ReadDouble();
+                            break;
+                        }
                 }
             }
         }
@@ -11124,7 +11129,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (PokemonId != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) PokemonId);
+                output.WriteEnum((int)PokemonId);
             }
             if (DistanceInMeters != 0F)
             {
@@ -11143,7 +11148,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (PokemonId != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PokemonId);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)PokemonId);
             }
             if (DistanceInMeters != 0F)
             {
@@ -11187,20 +11192,20 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        pokemonId_ = (global::AllEnum.PokemonId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            pokemonId_ = (global::AllEnum.PokemonId)input.ReadEnum();
+                            break;
+                        }
                     case 21:
-                    {
-                        DistanceInMeters = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            DistanceInMeters = input.ReadFloat();
+                            break;
+                        }
                     case 25:
-                    {
-                        EncounterId = input.ReadFixed64();
-                        break;
-                    }
+                        {
+                            EncounterId = input.ReadFixed64();
+                            break;
+                        }
                 }
             }
         }
@@ -11384,24 +11389,24 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        Error = input.ReadString();
-                        break;
-                    }
+                        {
+                            Error = input.ReadString();
+                            break;
+                        }
                     case 18:
-                    {
-                        Hash = input.ReadString();
-                        break;
-                    }
+                        {
+                            Hash = input.ReadString();
+                            break;
+                        }
                     case 26:
-                    {
-                        if (settings_ == null)
                         {
-                            settings_ = new global::PokemonGo.RocketAPI.GeneratedCode.GlobalSettings();
+                            if (settings_ == null)
+                            {
+                                settings_ = new global::PokemonGo.RocketAPI.GeneratedCode.GlobalSettings();
+                            }
+                            input.ReadMessage(settings_);
+                            break;
                         }
-                        input.ReadMessage(settings_);
-                        break;
-                    }
                 }
             }
         }
@@ -11647,46 +11652,46 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 18:
-                    {
-                        if (fortSettings_ == null)
                         {
-                            fortSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.FortSettings();
+                            if (fortSettings_ == null)
+                            {
+                                fortSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.FortSettings();
+                            }
+                            input.ReadMessage(fortSettings_);
+                            break;
                         }
-                        input.ReadMessage(fortSettings_);
-                        break;
-                    }
                     case 26:
-                    {
-                        if (mapSettings_ == null)
                         {
-                            mapSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.MapSettings();
+                            if (mapSettings_ == null)
+                            {
+                                mapSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.MapSettings();
+                            }
+                            input.ReadMessage(mapSettings_);
+                            break;
                         }
-                        input.ReadMessage(mapSettings_);
-                        break;
-                    }
                     case 34:
-                    {
-                        if (levelSettings_ == null)
                         {
-                            levelSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.LevelSettings();
+                            if (levelSettings_ == null)
+                            {
+                                levelSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.LevelSettings();
+                            }
+                            input.ReadMessage(levelSettings_);
+                            break;
                         }
-                        input.ReadMessage(levelSettings_);
-                        break;
-                    }
                     case 42:
-                    {
-                        if (inventorySettings_ == null)
                         {
-                            inventorySettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.InventorySettings();
-                        }
-                        input.ReadMessage(inventorySettings_);
-                        break;
-                    }
-                    case 50:
-                    {
-                        MinimumClientVersion = input.ReadString();
-                        break;
-                    }
+                            if (inventorySettings_ == null)
+                            {
+                                inventorySettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.InventorySettings();
+                            }
+                            input.ReadMessage(inventorySettings_);
+                            break;
+                        }
+                    case 50:
+                        {
+                            MinimumClientVersion = input.ReadString();
+                            break;
+                        }
                 }
             }
         }
@@ -11943,35 +11948,35 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 9:
-                    {
-                        InteractionRangeMeters = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            InteractionRangeMeters = input.ReadDouble();
+                            break;
+                        }
                     case 16:
-                    {
-                        MaxTotalDeployedPokemon = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            MaxTotalDeployedPokemon = input.ReadInt32();
+                            break;
+                        }
                     case 24:
-                    {
-                        MaxPlayerDeployedPokemon = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            MaxPlayerDeployedPokemon = input.ReadInt32();
+                            break;
+                        }
                     case 33:
-                    {
-                        DeployStaminaMultiplier = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            DeployStaminaMultiplier = input.ReadDouble();
+                            break;
+                        }
                     case 41:
-                    {
-                        DeployAttackMultiplier = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            DeployAttackMultiplier = input.ReadDouble();
+                            break;
+                        }
                     case 49:
-                    {
-                        FarInteractionRangeMeters = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            FarInteractionRangeMeters = input.ReadDouble();
+                            break;
+                        }
                 }
             }
         }
@@ -12254,40 +12259,40 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 9:
-                    {
-                        PokemonVisibleRange = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            PokemonVisibleRange = input.ReadDouble();
+                            break;
+                        }
                     case 17:
-                    {
-                        PokeNavRangeMeters = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            PokeNavRangeMeters = input.ReadDouble();
+                            break;
+                        }
                     case 25:
-                    {
-                        EncounterRangeMeters = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            EncounterRangeMeters = input.ReadDouble();
+                            break;
+                        }
                     case 37:
-                    {
-                        GetMapObjectsMinRefreshSeconds = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            GetMapObjectsMinRefreshSeconds = input.ReadFloat();
+                            break;
+                        }
                     case 45:
-                    {
-                        GetMapObjectsMaxRefreshSeconds = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            GetMapObjectsMaxRefreshSeconds = input.ReadFloat();
+                            break;
+                        }
                     case 53:
-                    {
-                        GetMapObjectsMinDistanceMeters = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            GetMapObjectsMinDistanceMeters = input.ReadFloat();
+                            break;
+                        }
                     case 58:
-                    {
-                        GoogleMapsApiKey = input.ReadString();
-                        break;
-                    }
+                        {
+                            GoogleMapsApiKey = input.ReadString();
+                            break;
+                        }
                 }
             }
         }
@@ -12446,15 +12451,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 17:
-                    {
-                        TrainerCpModifier = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            TrainerCpModifier = input.ReadDouble();
+                            break;
+                        }
                     case 25:
-                    {
-                        TrainerDifficultyModifier = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            TrainerDifficultyModifier = input.ReadDouble();
+                            break;
+                        }
                 }
             }
         }
@@ -12683,30 +12688,30 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        MaxPokemon = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            MaxPokemon = input.ReadInt32();
+                            break;
+                        }
                     case 16:
-                    {
-                        MaxBagItems = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            MaxBagItems = input.ReadInt32();
+                            break;
+                        }
                     case 24:
-                    {
-                        BasePokemon = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BasePokemon = input.ReadInt32();
+                            break;
+                        }
                     case 32:
-                    {
-                        BaseBagItems = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BaseBagItems = input.ReadInt32();
+                            break;
+                        }
                     case 40:
-                    {
-                        BaseEggs = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BaseEggs = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -12863,15 +12868,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 9:
-                    {
-                        Latitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Latitude = input.ReadDouble();
+                            break;
+                        }
                     case 17:
-                    {
-                        Longitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Longitude = input.ReadDouble();
+                            break;
+                        }
                 }
             }
         }
@@ -13039,20 +13044,20 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        wildPokemons_.AddEntriesFrom(input, _repeated_wildPokemons_codec);
-                        break;
-                    }
+                        {
+                            wildPokemons_.AddEntriesFrom(input, _repeated_wildPokemons_codec);
+                            break;
+                        }
                     case 18:
-                    {
-                        forts_.AddEntriesFrom(input, _repeated_forts_codec);
-                        break;
-                    }
+                        {
+                            forts_.AddEntriesFrom(input, _repeated_forts_codec);
+                            break;
+                        }
                     case 24:
-                    {
-                        FortsNearby = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            FortsNearby = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -13338,20 +13343,20 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        Success = input.ReadBool();
-                        break;
-                    }
+                        {
+                            Success = input.ReadBool();
+                            break;
+                        }
                     case 18:
-                    {
-                        itemTemplates_.AddEntriesFrom(input, _repeated_itemTemplates_codec);
-                        break;
-                    }
+                        {
+                            itemTemplates_.AddEntriesFrom(input, _repeated_itemTemplates_codec);
+                            break;
+                        }
                     case 24:
-                    {
-                        TimestampMs = input.ReadUInt64();
-                        break;
-                    }
+                        {
+                            TimestampMs = input.ReadUInt64();
+                            break;
+                        }
                 }
             }
         }
@@ -13928,150 +13933,150 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                                 input.SkipLastField();
                                 break;
                             case 10:
-                            {
-                                TemplateId = input.ReadString();
-                                break;
-                            }
+                                {
+                                    TemplateId = input.ReadString();
+                                    break;
+                                }
                             case 18:
-                            {
-                                if (pokemonSettings_ == null)
                                 {
-                                    pokemonSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonSettings();
+                                    if (pokemonSettings_ == null)
+                                    {
+                                        pokemonSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonSettings();
+                                    }
+                                    input.ReadMessage(pokemonSettings_);
+                                    break;
                                 }
-                                input.ReadMessage(pokemonSettings_);
-                                break;
-                            }
                             case 26:
-                            {
-                                if (itemSettings_ == null)
                                 {
-                                    itemSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.ItemSettings();
+                                    if (itemSettings_ == null)
+                                    {
+                                        itemSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.ItemSettings();
+                                    }
+                                    input.ReadMessage(itemSettings_);
+                                    break;
                                 }
-                                input.ReadMessage(itemSettings_);
-                                break;
-                            }
                             case 34:
-                            {
-                                if (moveSettings_ == null)
                                 {
-                                    moveSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.MoveSettings();
+                                    if (moveSettings_ == null)
+                                    {
+                                        moveSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.MoveSettings();
+                                    }
+                                    input.ReadMessage(moveSettings_);
+                                    break;
                                 }
-                                input.ReadMessage(moveSettings_);
-                                break;
-                            }
                             case 42:
-                            {
-                                if (moveSequenceSettings_ == null)
                                 {
-                                    moveSequenceSettings_ =
-                                        new global::PokemonGo.RocketAPI.GeneratedCode.MoveSequenceSettings();
+                                    if (moveSequenceSettings_ == null)
+                                    {
+                                        moveSequenceSettings_ =
+                                            new global::PokemonGo.RocketAPI.GeneratedCode.MoveSequenceSettings();
+                                    }
+                                    input.ReadMessage(moveSequenceSettings_);
+                                    break;
                                 }
-                                input.ReadMessage(moveSequenceSettings_);
-                                break;
-                            }
                             case 66:
-                            {
-                                if (typeEffective_ == null)
                                 {
-                                    typeEffective_ =
-                                        new global::PokemonGo.RocketAPI.GeneratedCode.TypeEffectiveSettings();
+                                    if (typeEffective_ == null)
+                                    {
+                                        typeEffective_ =
+                                            new global::PokemonGo.RocketAPI.GeneratedCode.TypeEffectiveSettings();
+                                    }
+                                    input.ReadMessage(typeEffective_);
+                                    break;
                                 }
-                                input.ReadMessage(typeEffective_);
-                                break;
-                            }
                             case 82:
-                            {
-                                if (badgeSettings_ == null)
                                 {
-                                    badgeSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.BadgeSettings();
+                                    if (badgeSettings_ == null)
+                                    {
+                                        badgeSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.BadgeSettings();
+                                    }
+                                    input.ReadMessage(badgeSettings_);
+                                    break;
                                 }
-                                input.ReadMessage(badgeSettings_);
-                                break;
-                            }
                             case 90:
-                            {
-                                if (camera_ == null)
                                 {
-                                    camera_ = new global::PokemonGo.RocketAPI.GeneratedCode.CameraSettings();
+                                    if (camera_ == null)
+                                    {
+                                        camera_ = new global::PokemonGo.RocketAPI.GeneratedCode.CameraSettings();
+                                    }
+                                    input.ReadMessage(camera_);
+                                    break;
                                 }
-                                input.ReadMessage(camera_);
-                                break;
-                            }
                             case 98:
-                            {
-                                if (playerLevel_ == null)
                                 {
-                                    playerLevel_ = new global::PokemonGo.RocketAPI.GeneratedCode.PlayerLevelSettings();
+                                    if (playerLevel_ == null)
+                                    {
+                                        playerLevel_ = new global::PokemonGo.RocketAPI.GeneratedCode.PlayerLevelSettings();
+                                    }
+                                    input.ReadMessage(playerLevel_);
+                                    break;
                                 }
-                                input.ReadMessage(playerLevel_);
-                                break;
-                            }
                             case 106:
-                            {
-                                if (gymLevel_ == null)
                                 {
-                                    gymLevel_ = new global::PokemonGo.RocketAPI.GeneratedCode.GymLevelSettings();
+                                    if (gymLevel_ == null)
+                                    {
+                                        gymLevel_ = new global::PokemonGo.RocketAPI.GeneratedCode.GymLevelSettings();
+                                    }
+                                    input.ReadMessage(gymLevel_);
+                                    break;
                                 }
-                                input.ReadMessage(gymLevel_);
-                                break;
-                            }
                             case 114:
-                            {
-                                if (battleSettings_ == null)
                                 {
-                                    battleSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.GymBattleSettings();
+                                    if (battleSettings_ == null)
+                                    {
+                                        battleSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.GymBattleSettings();
+                                    }
+                                    input.ReadMessage(battleSettings_);
+                                    break;
                                 }
-                                input.ReadMessage(battleSettings_);
-                                break;
-                            }
                             case 122:
-                            {
-                                if (encounterSettings_ == null)
                                 {
-                                    encounterSettings_ =
-                                        new global::PokemonGo.RocketAPI.GeneratedCode.EncounterSettings();
+                                    if (encounterSettings_ == null)
+                                    {
+                                        encounterSettings_ =
+                                            new global::PokemonGo.RocketAPI.GeneratedCode.EncounterSettings();
+                                    }
+                                    input.ReadMessage(encounterSettings_);
+                                    break;
                                 }
-                                input.ReadMessage(encounterSettings_);
-                                break;
-                            }
                             case 130:
-                            {
-                                if (iapItemDisplay_ == null)
                                 {
-                                    iapItemDisplay_ = new global::PokemonGo.RocketAPI.GeneratedCode.IapItemDisplay();
+                                    if (iapItemDisplay_ == null)
+                                    {
+                                        iapItemDisplay_ = new global::PokemonGo.RocketAPI.GeneratedCode.IapItemDisplay();
+                                    }
+                                    input.ReadMessage(iapItemDisplay_);
+                                    break;
                                 }
-                                input.ReadMessage(iapItemDisplay_);
-                                break;
-                            }
                             case 138:
-                            {
-                                if (iapSettings_ == null)
                                 {
-                                    iapSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.IapSettings();
+                                    if (iapSettings_ == null)
+                                    {
+                                        iapSettings_ = new global::PokemonGo.RocketAPI.GeneratedCode.IapSettings();
+                                    }
+                                    input.ReadMessage(iapSettings_);
+                                    break;
                                 }
-                                input.ReadMessage(iapSettings_);
-                                break;
-                            }
                             case 146:
-                            {
-                                if (pokemonUpgrades_ == null)
                                 {
-                                    pokemonUpgrades_ =
-                                        new global::PokemonGo.RocketAPI.GeneratedCode.PokemonUpgradeSettings();
+                                    if (pokemonUpgrades_ == null)
+                                    {
+                                        pokemonUpgrades_ =
+                                            new global::PokemonGo.RocketAPI.GeneratedCode.PokemonUpgradeSettings();
+                                    }
+                                    input.ReadMessage(pokemonUpgrades_);
+                                    break;
                                 }
-                                input.ReadMessage(pokemonUpgrades_);
-                                break;
-                            }
                             case 154:
-                            {
-                                if (equippedBadges_ == null)
                                 {
-                                    equippedBadges_ =
-                                        new global::PokemonGo.RocketAPI.GeneratedCode.EquippedBadgeSettings();
+                                    if (equippedBadges_ == null)
+                                    {
+                                        equippedBadges_ =
+                                            new global::PokemonGo.RocketAPI.GeneratedCode.EquippedBadgeSettings();
+                                    }
+                                    input.ReadMessage(equippedBadges_);
+                                    break;
                                 }
-                                input.ReadMessage(equippedBadges_);
-                                break;
-                            }
                         }
                     }
                 }
@@ -14205,7 +14210,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (ItemId != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) ItemId);
+                output.WriteEnum((int)ItemId);
             }
             if (EncounterId != 0UL)
             {
@@ -14224,7 +14229,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (ItemId != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ItemId);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)ItemId);
             }
             if (EncounterId != 0UL)
             {
@@ -14268,20 +14273,20 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        itemId_ = (global::AllEnum.ItemId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            itemId_ = (global::AllEnum.ItemId)input.ReadEnum();
+                            break;
+                        }
                     case 17:
-                    {
-                        EncounterId = input.ReadFixed64();
-                        break;
-                    }
+                        {
+                            EncounterId = input.ReadFixed64();
+                            break;
+                        }
                     case 26:
-                    {
-                        SpawnPointGuid = input.ReadString();
-                        break;
-                    }
+                        {
+                            SpawnPointGuid = input.ReadString();
+                            break;
+                        }
                 }
             }
         }
@@ -14316,7 +14321,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode

         private static readonly pb::MessageParser<UseItemRequest> _parser =
             new pb::MessageParser<UseItemRequest>(() => new UseItemRequest());
-
+
         private global::AllEnum.ItemId itemId_ = 0;

         public UseItemRequest()
@@ -14692,40 +14697,40 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        Success = input.ReadBool();
-                        break;
-                    }
+                        {
+                            Success = input.ReadBool();
+                            break;
+                        }
                     case 17:
-                    {
-                        ItemCaptureMult = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            ItemCaptureMult = input.ReadDouble();
+                            break;
+                        }
                     case 25:
-                    {
-                        ItemFleeMult = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            ItemFleeMult = input.ReadDouble();
+                            break;
+                        }
                     case 32:
-                    {
-                        StopMovement = input.ReadBool();
-                        break;
-                    }
+                        {
+                            StopMovement = input.ReadBool();
+                            break;
+                        }
                     case 40:
-                    {
-                        StopAttack = input.ReadBool();
-                        break;
-                    }
+                        {
+                            StopAttack = input.ReadBool();
+                            break;
+                        }
                     case 48:
-                    {
-                        TargetMax = input.ReadBool();
-                        break;
-                    }
+                        {
+                            TargetMax = input.ReadBool();
+                            break;
+                        }
                     case 56:
-                    {
-                        TargetSlow = input.ReadBool();
-                        break;
-                    }
+                        {
+                            TargetSlow = input.ReadBool();
+                            break;
+                        }
                 }
             }
         }
@@ -14859,10 +14864,10 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 9:
-                    {
-                        PokemonId = input.ReadFixed64();
-                        break;
-                    }
+                        {
+                            PokemonId = input.ReadFixed64();
+                            break;
+                        }
                 }
             }
         }
@@ -14965,7 +14970,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Result != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) Result);
+                output.WriteEnum((int)Result);
             }
             if (CandyAwarded != 0)
             {
@@ -14979,7 +14984,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (Result != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Result);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Result);
             }
             if (CandyAwarded != 0)
             {
@@ -15015,17 +15020,17 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        result_ =
-                            (global::PokemonGo.RocketAPI.GeneratedCode.ReleasePokemonResponse.Types.Result)
-                                input.ReadEnum();
-                        break;
-                    }
+                        {
+                            result_ =
+                                (global::PokemonGo.RocketAPI.GeneratedCode.ReleasePokemonResponse.Types.Result)
+                                    input.ReadEnum();
+                            break;
+                        }
                     case 16:
-                    {
-                        CandyAwarded = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            CandyAwarded = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -15058,11 +15063,16 @@ namespace PokemonGo.RocketAPI.GeneratedCode
         {
             public enum Result
             {
-                [pbr::OriginalName("UNSET")] Unset = 0,
-                [pbr::OriginalName("SUCCESS")] Success = 1,
-                [pbr::OriginalName("POKEMON_DEPLOYED")] PokemonDeployed = 2,
-                [pbr::OriginalName("FAILED")] Failed = 3,
-                [pbr::OriginalName("ERROR_POKEMON_IS_EGG")] ErrorPokemonIsEgg = 4,
+                [pbr::OriginalName("UNSET")]
+                Unset = 0,
+                [pbr::OriginalName("SUCCESS")]
+                Success = 1,
+                [pbr::OriginalName("POKEMON_DEPLOYED")]
+                PokemonDeployed = 2,
+                [pbr::OriginalName("FAILED")]
+                Failed = 3,
+                [pbr::OriginalName("ERROR_POKEMON_IS_EGG")]
+                ErrorPokemonIsEgg = 4,
             }
         }

@@ -15348,34 +15358,34 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        Success = input.ReadBool();
-                        break;
-                    }
+                        {
+                            Success = input.ReadBool();
+                            break;
+                        }
                     case 18:
                     case 16:
-                    {
-                        pokemonId_.AddEntriesFrom(input, _repeated_pokemonId_codec);
-                        break;
-                    }
+                        {
+                            pokemonId_.AddEntriesFrom(input, _repeated_pokemonId_codec);
+                            break;
+                        }
                     case 26:
                     case 24:
-                    {
-                        experienceAwarded_.AddEntriesFrom(input, _repeated_experienceAwarded_codec);
-                        break;
-                    }
+                        {
+                            experienceAwarded_.AddEntriesFrom(input, _repeated_experienceAwarded_codec);
+                            break;
+                        }
                     case 34:
                     case 32:
-                    {
-                        candyAwarded_.AddEntriesFrom(input, _repeated_candyAwarded_codec);
-                        break;
-                    }
+                        {
+                            candyAwarded_.AddEntriesFrom(input, _repeated_candyAwarded_codec);
+                            break;
+                        }
                     case 42:
                     case 40:
-                    {
-                        stardustAwarded_.AddEntriesFrom(input, _repeated_stardustAwarded_codec);
-                        break;
-                    }
+                        {
+                            stardustAwarded_.AddEntriesFrom(input, _repeated_stardustAwarded_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -15607,30 +15617,30 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        FortId = input.ReadString();
-                        break;
-                    }
+                        {
+                            FortId = input.ReadString();
+                            break;
+                        }
                     case 17:
-                    {
-                        PlayerLatitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            PlayerLatitude = input.ReadDouble();
+                            break;
+                        }
                     case 25:
-                    {
-                        PlayerLongitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            PlayerLongitude = input.ReadDouble();
+                            break;
+                        }
                     case 33:
-                    {
-                        FortLatitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            FortLatitude = input.ReadDouble();
+                            break;
+                        }
                     case 41:
-                    {
-                        FortLongitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            FortLongitude = input.ReadDouble();
+                            break;
+                        }
                 }
             }
         }
@@ -15807,7 +15817,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Result != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) Result);
+                output.WriteEnum((int)Result);
             }
             itemsAwarded_.WriteTo(output, _repeated_itemsAwarded_codec);
             if (GemsAwarded != 0)
@@ -15842,7 +15852,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (Result != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Result);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Result);
             }
             size += itemsAwarded_.CalculateSize(_repeated_itemsAwarded_codec);
             if (GemsAwarded != 0)
@@ -15916,45 +15926,45 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        result_ =
-                            (global::PokemonGo.RocketAPI.GeneratedCode.FortSearchResponse.Types.Result) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            result_ =
+                                (global::PokemonGo.RocketAPI.GeneratedCode.FortSearchResponse.Types.Result)input.ReadEnum();
+                            break;
+                        }
                     case 18:
-                    {
-                        itemsAwarded_.AddEntriesFrom(input, _repeated_itemsAwarded_codec);
-                        break;
-                    }
+                        {
+                            itemsAwarded_.AddEntriesFrom(input, _repeated_itemsAwarded_codec);
+                            break;
+                        }
                     case 24:
-                    {
-                        GemsAwarded = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            GemsAwarded = input.ReadInt32();
+                            break;
+                        }
                     case 34:
-                    {
-                        if (pokemonDataEgg_ == null)
                         {
-                            pokemonDataEgg_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonData();
+                            if (pokemonDataEgg_ == null)
+                            {
+                                pokemonDataEgg_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonData();
+                            }
+                            input.ReadMessage(pokemonDataEgg_);
+                            break;
                         }
-                        input.ReadMessage(pokemonDataEgg_);
-                        break;
-                    }
                     case 40:
-                    {
-                        ExperienceAwarded = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            ExperienceAwarded = input.ReadInt32();
+                            break;
+                        }
                     case 48:
-                    {
-                        CooldownCompleteTimestampMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            CooldownCompleteTimestampMs = input.ReadInt64();
+                            break;
+                        }
                     case 56:
-                    {
-                        ChainHackSequenceNumber = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            ChainHackSequenceNumber = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -15992,11 +16002,16 @@ namespace PokemonGo.RocketAPI.GeneratedCode
         {
             public enum Result
             {
-                [pbr::OriginalName("NO_RESULT_SET")] NoResultSet = 0,
-                [pbr::OriginalName("SUCCESS")] Success = 1,
-                [pbr::OriginalName("OUT_OF_RANGE")] OutOfRange = 2,
-                [pbr::OriginalName("IN_COOLDOWN_PERIOD")] InCooldownPeriod = 3,
-                [pbr::OriginalName("INVENTORY_FULL")] InventoryFull = 4,
+                [pbr::OriginalName("NO_RESULT_SET")]
+                NoResultSet = 0,
+                [pbr::OriginalName("SUCCESS")]
+                Success = 1,
+                [pbr::OriginalName("OUT_OF_RANGE")]
+                OutOfRange = 2,
+                [pbr::OriginalName("IN_COOLDOWN_PERIOD")]
+                InCooldownPeriod = 3,
+                [pbr::OriginalName("INVENTORY_FULL")]
+                InventoryFull = 4,
             }

             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -16080,7 +16095,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                     if (ItemId != 0)
                     {
                         output.WriteRawTag(8);
-                        output.WriteEnum((int) ItemId);
+                        output.WriteEnum((int)ItemId);
                     }
                     if (ItemCount != 0)
                     {
@@ -16094,7 +16109,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                     var size = 0;
                     if (ItemId != 0)
                     {
-                        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ItemId);
+                        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)ItemId);
                     }
                     if (ItemCount != 0)
                     {
@@ -16130,15 +16145,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                                 input.SkipLastField();
                                 break;
                             case 8:
-                            {
-                                itemId_ = (global::AllEnum.ItemId) input.ReadEnum();
-                                break;
-                            }
+                                {
+                                    itemId_ = (global::AllEnum.ItemId)input.ReadEnum();
+                                    break;
+                                }
                             case 16:
-                            {
-                                ItemCount = input.ReadInt32();
-                                break;
-                            }
+                                {
+                                    ItemCount = input.ReadInt32();
+                                    break;
+                                }
                         }
                     }
                 }
@@ -16321,20 +16336,20 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        FortId = input.ReadString();
-                        break;
-                    }
+                        {
+                            FortId = input.ReadString();
+                            break;
+                        }
                     case 17:
-                    {
-                        Latitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Latitude = input.ReadDouble();
+                            break;
+                        }
                     case 25:
-                    {
-                        Longitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Longitude = input.ReadDouble();
+                            break;
+                        }
                 }
             }
         }
@@ -16584,7 +16599,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (TeamColor != 0)
             {
                 output.WriteRawTag(16);
-                output.WriteEnum((int) TeamColor);
+                output.WriteEnum((int)TeamColor);
             }
             if (pokemonData_ != null)
             {
@@ -16615,7 +16630,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Type != 0)
             {
                 output.WriteRawTag(72);
-                output.WriteEnum((int) Type);
+                output.WriteEnum((int)Type);
             }
             if (Latitude != 0D)
             {
@@ -16644,7 +16659,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (TeamColor != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TeamColor);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)TeamColor);
             }
             if (pokemonData_ != null)
             {
@@ -16669,7 +16684,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (Type != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Type);
             }
             if (Latitude != 0D)
             {
@@ -16756,74 +16771,74 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        FortId = input.ReadString();
-                        break;
-                    }
+                        {
+                            FortId = input.ReadString();
+                            break;
+                        }
                     case 16:
-                    {
-                        teamColor_ = (global::AllEnum.TeamColor) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            teamColor_ = (global::AllEnum.TeamColor)input.ReadEnum();
+                            break;
+                        }
                     case 26:
-                    {
-                        if (pokemonData_ == null)
                         {
-                            pokemonData_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonData();
+                            if (pokemonData_ == null)
+                            {
+                                pokemonData_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonData();
+                            }
+                            input.ReadMessage(pokemonData_);
+                            break;
                         }
-                        input.ReadMessage(pokemonData_);
-                        break;
-                    }
                     case 34:
-                    {
-                        Name = input.ReadString();
-                        break;
-                    }
+                        {
+                            Name = input.ReadString();
+                            break;
+                        }
                     case 42:
-                    {
-                        imageUrls_.AddEntriesFrom(input, _repeated_imageUrls_codec);
-                        break;
-                    }
+                        {
+                            imageUrls_.AddEntriesFrom(input, _repeated_imageUrls_codec);
+                            break;
+                        }
                     case 48:
-                    {
-                        Fp = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Fp = input.ReadInt32();
+                            break;
+                        }
                     case 56:
-                    {
-                        Stamina = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Stamina = input.ReadInt32();
+                            break;
+                        }
                     case 64:
-                    {
-                        MaxStamina = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            MaxStamina = input.ReadInt32();
+                            break;
+                        }
                     case 72:
-                    {
-                        type_ = (global::AllEnum.FortType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            type_ = (global::AllEnum.FortType)input.ReadEnum();
+                            break;
+                        }
                     case 81:
-                    {
-                        Latitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Latitude = input.ReadDouble();
+                            break;
+                        }
                     case 89:
-                    {
-                        Longitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            Longitude = input.ReadDouble();
+                            break;
+                        }
                     case 98:
-                    {
-                        Description = input.ReadString();
-                        break;
-                    }
+                        {
+                            Description = input.ReadString();
+                            break;
+                        }
                     case 106:
-                    {
-                        modifiers_.AddEntriesFrom(input, _repeated_modifiers_codec);
-                        break;
-                    }
+                        {
+                            modifiers_.AddEntriesFrom(input, _repeated_modifiers_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -16950,7 +16965,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (ItemId != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) ItemId);
+                output.WriteEnum((int)ItemId);
             }
             if (ExpirationTimestampMs != 0L)
             {
@@ -16969,7 +16984,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (ItemId != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ItemId);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)ItemId);
             }
             if (ExpirationTimestampMs != 0L)
             {
@@ -17013,20 +17028,20 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        itemId_ = (global::AllEnum.ItemId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            itemId_ = (global::AllEnum.ItemId)input.ReadEnum();
+                            break;
+                        }
                     case 16:
-                    {
-                        ExpirationTimestampMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            ExpirationTimestampMs = input.ReadInt64();
+                            break;
+                        }
                     case 26:
-                    {
-                        DeployerPlayerCodename = input.ReadString();
-                        break;
-                    }
+                        {
+                            DeployerPlayerCodename = input.ReadString();
+                            break;
+                        }
                 }
             }
         }
@@ -17231,25 +17246,25 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 9:
-                    {
-                        EncounterId = input.ReadFixed64();
-                        break;
-                    }
+                        {
+                            EncounterId = input.ReadFixed64();
+                            break;
+                        }
                     case 18:
-                    {
-                        SpawnpointId = input.ReadString();
-                        break;
-                    }
+                        {
+                            SpawnpointId = input.ReadString();
+                            break;
+                        }
                     case 25:
-                    {
-                        PlayerLatitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            PlayerLatitude = input.ReadDouble();
+                            break;
+                        }
                     case 33:
-                    {
-                        PlayerLongitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            PlayerLongitude = input.ReadDouble();
+                            break;
+                        }
                 }
             }
         }
@@ -17384,12 +17399,12 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Background != 0)
             {
                 output.WriteRawTag(16);
-                output.WriteEnum((int) Background);
+                output.WriteEnum((int)Background);
             }
             if (Status != 0)
             {
                 output.WriteRawTag(24);
-                output.WriteEnum((int) Status);
+                output.WriteEnum((int)Status);
             }
             if (captureProbability_ != null)
             {
@@ -17407,11 +17422,11 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (Background != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Background);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Background);
             }
             if (Status != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Status);
             }
             if (captureProbability_ != null)
             {
@@ -17463,36 +17478,36 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        if (wildPokemon_ == null)
                         {
-                            wildPokemon_ = new global::PokemonGo.RocketAPI.GeneratedCode.WildPokemon();
+                            if (wildPokemon_ == null)
+                            {
+                                wildPokemon_ = new global::PokemonGo.RocketAPI.GeneratedCode.WildPokemon();
+                            }
+                            input.ReadMessage(wildPokemon_);
+                            break;
                         }
-                        input.ReadMessage(wildPokemon_);
-                        break;
-                    }
                     case 16:
-                    {
-                        background_ =
-                            (global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Background)
-                                input.ReadEnum();
-                        break;
-                    }
+                        {
+                            background_ =
+                                (global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Background)
+                                    input.ReadEnum();
+                            break;
+                        }
                     case 24:
-                    {
-                        status_ =
-                            (global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Status) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            status_ =
+                                (global::PokemonGo.RocketAPI.GeneratedCode.EncounterResponse.Types.Status)input.ReadEnum();
+                            break;
+                        }
                     case 34:
-                    {
-                        if (captureProbability_ == null)
                         {
-                            captureProbability_ = new global::PokemonGo.RocketAPI.GeneratedCode.CaptureProbability();
+                            if (captureProbability_ == null)
+                            {
+                                captureProbability_ = new global::PokemonGo.RocketAPI.GeneratedCode.CaptureProbability();
+                            }
+                            input.ReadMessage(captureProbability_);
+                            break;
                         }
-                        input.ReadMessage(captureProbability_);
-                        break;
-                    }
                 }
             }
         }
@@ -17527,20 +17542,30 @@ namespace PokemonGo.RocketAPI.GeneratedCode
         {
             public enum Background
             {
-                [pbr::OriginalName("PARK")] Park = 0,
-                [pbr::OriginalName("DESERT")] Desert = 1,
+                [pbr::OriginalName("PARK")]
+                Park = 0,
+                [pbr::OriginalName("DESERT")]
+                Desert = 1,
             }

             public enum Status
             {
-                [pbr::OriginalName("ENCOUNTER_ERROR")] EncounterError = 0,
-                [pbr::OriginalName("ENCOUNTER_SUCCESS")] EncounterSuccess = 1,
-                [pbr::OriginalName("ENCOUNTER_NOT_FOUND")] EncounterNotFound = 2,
-                [pbr::OriginalName("ENCOUNTER_CLOSED")] EncounterClosed = 3,
-                [pbr::OriginalName("ENCOUNTER_POKEMON_FLED")] EncounterPokemonFled = 4,
-                [pbr::OriginalName("ENCOUNTER_NOT_IN_RANGE")] EncounterNotInRange = 5,
-                [pbr::OriginalName("ENCOUNTER_ALREADY_HAPPENED")] EncounterAlreadyHappened = 6,
-                [pbr::OriginalName("POKEMON_INVENTORY_FULL")] PokemonInventoryFull = 7,
+                [pbr::OriginalName("ENCOUNTER_ERROR")]
+                EncounterError = 0,
+                [pbr::OriginalName("ENCOUNTER_SUCCESS")]
+                EncounterSuccess = 1,
+                [pbr::OriginalName("ENCOUNTER_NOT_FOUND")]
+                EncounterNotFound = 2,
+                [pbr::OriginalName("ENCOUNTER_CLOSED")]
+                EncounterClosed = 3,
+                [pbr::OriginalName("ENCOUNTER_POKEMON_FLED")]
+                EncounterPokemonFled = 4,
+                [pbr::OriginalName("ENCOUNTER_NOT_IN_RANGE")]
+                EncounterNotInRange = 5,
+                [pbr::OriginalName("ENCOUNTER_ALREADY_HAPPENED")]
+                EncounterAlreadyHappened = 6,
+                [pbr::OriginalName("POKEMON_INVENTORY_FULL")]
+                PokemonInventoryFull = 7,
             }
         }

@@ -17563,7 +17588,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             new pb::MessageParser<CaptureProbability>(() => new CaptureProbability());

         private static readonly pb::FieldCodec<global::AllEnum.ItemId> _repeated_pokeballType_codec
-            = pb::FieldCodec.ForEnum(10, x => (int) x, x => (global::AllEnum.ItemId) x);
+            = pb::FieldCodec.ForEnum(10, x => (int)x, x => (global::AllEnum.ItemId)x);

         private static readonly pb::FieldCodec<float> _repeated_captureProbability_codec
             = pb::FieldCodec.ForFloat(18);
@@ -17688,21 +17713,21 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         break;
                     case 10:
                     case 8:
-                    {
-                        pokeballType_.AddEntriesFrom(input, _repeated_pokeballType_codec);
-                        break;
-                    }
+                        {
+                            pokeballType_.AddEntriesFrom(input, _repeated_pokeballType_codec);
+                            break;
+                        }
                     case 18:
                     case 21:
-                    {
-                        captureProbability_.AddEntriesFrom(input, _repeated_captureProbability_codec);
-                        break;
-                    }
+                        {
+                            captureProbability_.AddEntriesFrom(input, _repeated_captureProbability_codec);
+                            break;
+                        }
                     case 97:
-                    {
-                        ReticleDifficultyScale = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            ReticleDifficultyScale = input.ReadDouble();
+                            break;
+                        }
                 }
             }
         }
@@ -17907,25 +17932,25 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 9:
-                    {
-                        EncounterId = input.ReadFixed64();
-                        break;
-                    }
+                        {
+                            EncounterId = input.ReadFixed64();
+                            break;
+                        }
                     case 18:
-                    {
-                        FortId = input.ReadString();
-                        break;
-                    }
+                        {
+                            FortId = input.ReadString();
+                            break;
+                        }
                     case 25:
-                    {
-                        PlayerLatitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            PlayerLatitude = input.ReadDouble();
+                            break;
+                        }
                     case 33:
-                    {
-                        PlayerLongitude = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            PlayerLongitude = input.ReadDouble();
+                            break;
+                        }
                 }
             }
         }
@@ -18043,7 +18068,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Result != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) Result);
+                output.WriteEnum((int)Result);
             }
             if (pokemonData_ != null)
             {
@@ -18062,7 +18087,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (Result != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Result);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Result);
             }
             if (pokemonData_ != null)
             {
@@ -18114,30 +18139,30 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        result_ =
-                            (global::PokemonGo.RocketAPI.GeneratedCode.DiskEncounterResponse.Types.Result)
-                                input.ReadEnum();
-                        break;
-                    }
+                        {
+                            result_ =
+                                (global::PokemonGo.RocketAPI.GeneratedCode.DiskEncounterResponse.Types.Result)
+                                    input.ReadEnum();
+                            break;
+                        }
                     case 18:
-                    {
-                        if (pokemonData_ == null)
                         {
-                            pokemonData_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonData();
+                            if (pokemonData_ == null)
+                            {
+                                pokemonData_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokemonData();
+                            }
+                            input.ReadMessage(pokemonData_);
+                            break;
                         }
-                        input.ReadMessage(pokemonData_);
-                        break;
-                    }
                     case 26:
-                    {
-                        if (captureProbability_ == null)
                         {
-                            captureProbability_ = new global::PokemonGo.RocketAPI.GeneratedCode.CaptureProbability();
+                            if (captureProbability_ == null)
+                            {
+                                captureProbability_ = new global::PokemonGo.RocketAPI.GeneratedCode.CaptureProbability();
+                            }
+                            input.ReadMessage(captureProbability_);
+                            break;
                         }
-                        input.ReadMessage(captureProbability_);
-                        break;
-                    }
                 }
             }
         }
@@ -18171,12 +18196,18 @@ namespace PokemonGo.RocketAPI.GeneratedCode
         {
             public enum Result
             {
-                [pbr::OriginalName("UNKNOWN")] Unknown = 0,
-                [pbr::OriginalName("SUCCESS")] Success = 1,
-                [pbr::OriginalName("NOT_AVAILABLE")] NotAvailable = 2,
-                [pbr::OriginalName("NOT_IN_RANGE")] NotInRange = 3,
-                [pbr::OriginalName("ENCOUNTER_ALREADY_FINISHED")] EncounterAlreadyFinished = 4,
-                [pbr::OriginalName("POKEMON_INVENTORY_FULL")] PokemonInventoryFull = 5,
+                [pbr::OriginalName("UNKNOWN")]
+                Unknown = 0,
+                [pbr::OriginalName("SUCCESS")]
+                Success = 1,
+                [pbr::OriginalName("NOT_AVAILABLE")]
+                NotAvailable = 2,
+                [pbr::OriginalName("NOT_IN_RANGE")]
+                NotInRange = 3,
+                [pbr::OriginalName("ENCOUNTER_ALREADY_FINISHED")]
+                EncounterAlreadyFinished = 4,
+                [pbr::OriginalName("POKEMON_INVENTORY_FULL")]
+                PokemonInventoryFull = 5,
             }
         }

@@ -18436,40 +18467,40 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 9:
-                    {
-                        EncounterId = input.ReadFixed64();
-                        break;
-                    }
+                        {
+                            EncounterId = input.ReadFixed64();
+                            break;
+                        }
                     case 16:
-                    {
-                        Pokeball = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Pokeball = input.ReadInt32();
+                            break;
+                        }
                     case 25:
-                    {
-                        NormalizedReticleSize = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            NormalizedReticleSize = input.ReadDouble();
+                            break;
+                        }
                     case 34:
-                    {
-                        SpawnPointGuid = input.ReadString();
-                        break;
-                    }
+                        {
+                            SpawnPointGuid = input.ReadString();
+                            break;
+                        }
                     case 40:
-                    {
-                        HitPokemon = input.ReadBool();
-                        break;
-                    }
+                        {
+                            HitPokemon = input.ReadBool();
+                            break;
+                        }
                     case 49:
-                    {
-                        SpinModifier = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            SpinModifier = input.ReadDouble();
+                            break;
+                        }
                     case 57:
-                    {
-                        NormalizedHitPosition = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            NormalizedHitPosition = input.ReadDouble();
+                            break;
+                        }
                 }
             }
         }
@@ -18602,7 +18633,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Status != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) Status);
+                output.WriteEnum((int)Status);
             }
             if (MissPercent != 0D)
             {
@@ -18626,7 +18657,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (Status != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Status);
             }
             if (MissPercent != 0D)
             {
@@ -18682,31 +18713,31 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        status_ =
-                            (global::PokemonGo.RocketAPI.GeneratedCode.CatchPokemonResponse.Types.CatchStatus)
-                                input.ReadEnum();
-                        break;
-                    }
+                        {
+                            status_ =
+                                (global::PokemonGo.RocketAPI.GeneratedCode.CatchPokemonResponse.Types.CatchStatus)
+                                    input.ReadEnum();
+                            break;
+                        }
                     case 17:
-                    {
-                        MissPercent = input.ReadDouble();
-                        break;
-                    }
+                        {
+                            MissPercent = input.ReadDouble();
+                            break;
+                        }
                     case 24:
-                    {
-                        CapturedPokemonId = input.ReadUInt64();
-                        break;
-                    }
+                        {
+                            CapturedPokemonId = input.ReadUInt64();
+                            break;
+                        }
                     case 34:
-                    {
-                        if (scores_ == null)
                         {
-                            scores_ = new global::PokemonGo.RocketAPI.GeneratedCode.CaptureScore();
+                            if (scores_ == null)
+                            {
+                                scores_ = new global::PokemonGo.RocketAPI.GeneratedCode.CaptureScore();
+                            }
+                            input.ReadMessage(scores_);
+                            break;
                         }
-                        input.ReadMessage(scores_);
-                        break;
-                    }
                 }
             }
         }
@@ -18741,11 +18772,16 @@ namespace PokemonGo.RocketAPI.GeneratedCode
         {
             public enum CatchStatus
             {
-                [pbr::OriginalName("CATCH_ERROR")] CatchError = 0,
-                [pbr::OriginalName("CATCH_SUCCESS")] CatchSuccess = 1,
-                [pbr::OriginalName("CATCH_ESCAPE")] CatchEscape = 2,
-                [pbr::OriginalName("CATCH_FLEE")] CatchFlee = 3,
-                [pbr::OriginalName("CATCH_MISSED")] CatchMissed = 4,
+                [pbr::OriginalName("CATCH_ERROR")]
+                CatchError = 0,
+                [pbr::OriginalName("CATCH_SUCCESS")]
+                CatchSuccess = 1,
+                [pbr::OriginalName("CATCH_ESCAPE")]
+                CatchEscape = 2,
+                [pbr::OriginalName("CATCH_FLEE")]
+                CatchFlee = 3,
+                [pbr::OriginalName("CATCH_MISSED")]
+                CatchMissed = 4,
             }
         }

@@ -18771,7 +18807,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             new pb::MessageParser<CaptureScore>(() => new CaptureScore());

         private static readonly pb::FieldCodec<global::AllEnum.ActivityType> _repeated_activityType_codec
-            = pb::FieldCodec.ForEnum(10, x => (int) x, x => (global::AllEnum.ActivityType) x);
+            = pb::FieldCodec.ForEnum(10, x => (int)x, x => (global::AllEnum.ActivityType)x);

         private static readonly pb::FieldCodec<int> _repeated_xp_codec
             = pb::FieldCodec.ForInt32(18);
@@ -18901,28 +18937,28 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         break;
                     case 10:
                     case 8:
-                    {
-                        activityType_.AddEntriesFrom(input, _repeated_activityType_codec);
-                        break;
-                    }
+                        {
+                            activityType_.AddEntriesFrom(input, _repeated_activityType_codec);
+                            break;
+                        }
                     case 18:
                     case 16:
-                    {
-                        xp_.AddEntriesFrom(input, _repeated_xp_codec);
-                        break;
-                    }
+                        {
+                            xp_.AddEntriesFrom(input, _repeated_xp_codec);
+                            break;
+                        }
                     case 26:
                     case 24:
-                    {
-                        candy_.AddEntriesFrom(input, _repeated_candy_codec);
-                        break;
-                    }
+                        {
+                            candy_.AddEntriesFrom(input, _repeated_candy_codec);
+                            break;
+                        }
                     case 34:
                     case 32:
-                    {
-                        stardust_.AddEntriesFrom(input, _repeated_stardust_codec);
-                        break;
-                    }
+                        {
+                            stardust_.AddEntriesFrom(input, _repeated_stardust_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -19072,7 +19108,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             new pb::MessageParser<CheckAwardedBadgesResponse>(() => new CheckAwardedBadgesResponse());

         private static readonly pb::FieldCodec<global::AllEnum.BadgeType> _repeated_awardedBadges_codec
-            = pb::FieldCodec.ForEnum(18, x => (int) x, x => (global::AllEnum.BadgeType) x);
+            = pb::FieldCodec.ForEnum(18, x => (int)x, x => (global::AllEnum.BadgeType)x);

         private static readonly pb::FieldCodec<int> _repeated_awardedBadgeLevels_codec
             = pb::FieldCodec.ForInt32(26);
@@ -19196,22 +19232,22 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        Success = input.ReadBool();
-                        break;
-                    }
+                        {
+                            Success = input.ReadBool();
+                            break;
+                        }
                     case 18:
                     case 16:
-                    {
-                        awardedBadges_.AddEntriesFrom(input, _repeated_awardedBadges_codec);
-                        break;
-                    }
+                        {
+                            awardedBadges_.AddEntriesFrom(input, _repeated_awardedBadges_codec);
+                            break;
+                        }
                     case 26:
                     case 24:
-                    {
-                        awardedBadgeLevels_.AddEntriesFrom(input, _repeated_awardedBadgeLevels_codec);
-                        break;
-                    }
+                        {
+                            awardedBadgeLevels_.AddEntriesFrom(input, _repeated_awardedBadgeLevels_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -19375,22 +19411,22 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        EquipBadgeCooldownMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            EquipBadgeCooldownMs = input.ReadInt64();
+                            break;
+                        }
                     case 18:
                     case 21:
-                    {
-                        catchProbabilityBonus_.AddEntriesFrom(input, _repeated_catchProbabilityBonus_codec);
-                        break;
-                    }
+                        {
+                            catchProbabilityBonus_.AddEntriesFrom(input, _repeated_catchProbabilityBonus_codec);
+                            break;
+                        }
                     case 26:
                     case 29:
-                    {
-                        fleeProbabilityBonus_.AddEntriesFrom(input, _repeated_fleeProbabilityBonus_codec);
-                        break;
-                    }
+                        {
+                            fleeProbabilityBonus_.AddEntriesFrom(input, _repeated_fleeProbabilityBonus_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -19579,27 +19615,27 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        UpgradesPerLevel = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            UpgradesPerLevel = input.ReadInt32();
+                            break;
+                        }
                     case 16:
-                    {
-                        AllowedLevelsAbovePlayer = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            AllowedLevelsAbovePlayer = input.ReadInt32();
+                            break;
+                        }
                     case 26:
                     case 24:
-                    {
-                        candyCost_.AddEntriesFrom(input, _repeated_candyCost_codec);
-                        break;
-                    }
+                        {
+                            candyCost_.AddEntriesFrom(input, _repeated_candyCost_codec);
+                            break;
+                        }
                     case 34:
                     case 32:
-                    {
-                        stardustCost_.AddEntriesFrom(input, _repeated_stardustCost_codec);
-                        break;
-                    }
+                        {
+                            stardustCost_.AddEntriesFrom(input, _repeated_stardustCost_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -19864,41 +19900,41 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        DailyBonusCoins = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            DailyBonusCoins = input.ReadInt32();
+                            break;
+                        }
                     case 18:
                     case 16:
-                    {
-                        dailyDefenderBonusPerPokemon_.AddEntriesFrom(input, _repeated_dailyDefenderBonusPerPokemon_codec);
-                        break;
-                    }
+                        {
+                            dailyDefenderBonusPerPokemon_.AddEntriesFrom(input, _repeated_dailyDefenderBonusPerPokemon_codec);
+                            break;
+                        }
                     case 24:
-                    {
-                        DailyDefenderBonusMaxDefenders = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            DailyDefenderBonusMaxDefenders = input.ReadInt32();
+                            break;
+                        }
                     case 34:
-                    {
-                        dailyDefenderBonusCurrency_.AddEntriesFrom(input, _repeated_dailyDefenderBonusCurrency_codec);
-                        break;
-                    }
+                        {
+                            dailyDefenderBonusCurrency_.AddEntriesFrom(input, _repeated_dailyDefenderBonusCurrency_codec);
+                            break;
+                        }
                     case 40:
-                    {
-                        MinTimeBetweenClaimsMs = input.ReadInt64();
-                        break;
-                    }
+                        {
+                            MinTimeBetweenClaimsMs = input.ReadInt64();
+                            break;
+                        }
                     case 48:
-                    {
-                        DailyBonusEnabled = input.ReadBool();
-                        break;
-                    }
+                        {
+                            DailyBonusEnabled = input.ReadBool();
+                            break;
+                        }
                     case 56:
-                    {
-                        DailyDefenderBonusEnabled = input.ReadBool();
-                        break;
-                    }
+                        {
+                            DailyDefenderBonusEnabled = input.ReadBool();
+                            break;
+                        }
                 }
             }
         }
@@ -19951,7 +19987,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             new pb::MessageParser<IapItemDisplay>(() => new IapItemDisplay());

         private static readonly pb::FieldCodec<global::AllEnum.ItemId> _repeated_itemIds_codec
-            = pb::FieldCodec.ForEnum(34, x => (int) x, x => (global::AllEnum.ItemId) x);
+            = pb::FieldCodec.ForEnum(34, x => (int)x, x => (global::AllEnum.ItemId)x);

         private static readonly pb::FieldCodec<int> _repeated_counts_codec
             = pb::FieldCodec.ForInt32(42);
@@ -20055,7 +20091,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Category != 0)
             {
                 output.WriteRawTag(16);
-                output.WriteEnum((int) Category);
+                output.WriteEnum((int)Category);
             }
             if (SortOrder != 0)
             {
@@ -20075,7 +20111,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (Category != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Category);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Category);
             }
             if (SortOrder != 0)
             {
@@ -20119,32 +20155,32 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        Sku = input.ReadString();
-                        break;
-                    }
+                        {
+                            Sku = input.ReadString();
+                            break;
+                        }
                     case 16:
-                    {
-                        category_ = (global::AllEnum.HoloIapItemCategory) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            category_ = (global::AllEnum.HoloIapItemCategory)input.ReadEnum();
+                            break;
+                        }
                     case 24:
-                    {
-                        SortOrder = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            SortOrder = input.ReadInt32();
+                            break;
+                        }
                     case 34:
                     case 32:
-                    {
-                        itemIds_.AddEntriesFrom(input, _repeated_itemIds_codec);
-                        break;
-                    }
+                        {
+                            itemIds_.AddEntriesFrom(input, _repeated_itemIds_codec);
+                            break;
+                        }
                     case 42:
                     case 40:
-                    {
-                        counts_.AddEntriesFrom(input, _repeated_counts_codec);
-                        break;
-                    }
+                        {
+                            counts_.AddEntriesFrom(input, _repeated_counts_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -20376,30 +20412,30 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 13:
-                    {
-                        SpinBonusThreshold = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            SpinBonusThreshold = input.ReadFloat();
+                            break;
+                        }
                     case 21:
-                    {
-                        ExcellentThrowThreshold = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            ExcellentThrowThreshold = input.ReadFloat();
+                            break;
+                        }
                     case 29:
-                    {
-                        GreatThrowThreshold = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            GreatThrowThreshold = input.ReadFloat();
+                            break;
+                        }
                     case 37:
-                    {
-                        NiceThrowThreshold = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            NiceThrowThreshold = input.ReadFloat();
+                            break;
+                        }
                     case 40:
-                    {
-                        MilestoneThreshold = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            MilestoneThreshold = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -20856,75 +20892,75 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 13:
-                    {
-                        EnergyPerSec = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            EnergyPerSec = input.ReadFloat();
+                            break;
+                        }
                     case 21:
-                    {
-                        DodgeEnergyCost = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            DodgeEnergyCost = input.ReadFloat();
+                            break;
+                        }
                     case 29:
-                    {
-                        RetargetSeconds = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            RetargetSeconds = input.ReadFloat();
+                            break;
+                        }
                     case 37:
-                    {
-                        EnemyAttackInterval = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            EnemyAttackInterval = input.ReadFloat();
+                            break;
+                        }
                     case 45:
-                    {
-                        AttackServerInterval = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            AttackServerInterval = input.ReadFloat();
+                            break;
+                        }
                     case 53:
-                    {
-                        RoundDurationSeconds = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            RoundDurationSeconds = input.ReadFloat();
+                            break;
+                        }
                     case 61:
-                    {
-                        BonusTimePerAllySeconds = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            BonusTimePerAllySeconds = input.ReadFloat();
+                            break;
+                        }
                     case 64:
-                    {
-                        MaximumAttackersPerBattle = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            MaximumAttackersPerBattle = input.ReadInt32();
+                            break;
+                        }
                     case 77:
-                    {
-                        SameTypeAttackBonusMultiplier = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            SameTypeAttackBonusMultiplier = input.ReadFloat();
+                            break;
+                        }
                     case 80:
-                    {
-                        MaximumEnergy = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            MaximumEnergy = input.ReadInt32();
+                            break;
+                        }
                     case 93:
-                    {
-                        EnergyDeltaPerHealthLost = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            EnergyDeltaPerHealthLost = input.ReadFloat();
+                            break;
+                        }
                     case 96:
-                    {
-                        DodgeDurationMs = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            DodgeDurationMs = input.ReadInt32();
+                            break;
+                        }
                     case 104:
-                    {
-                        MinimumPlayerLevel = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            MinimumPlayerLevel = input.ReadInt32();
+                            break;
+                        }
                     case 112:
-                    {
-                        SwapDurationMs = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            SwapDurationMs = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -21109,28 +21145,28 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         break;
                     case 10:
                     case 8:
-                    {
-                        requiredExperience_.AddEntriesFrom(input, _repeated_requiredExperience_codec);
-                        break;
-                    }
+                        {
+                            requiredExperience_.AddEntriesFrom(input, _repeated_requiredExperience_codec);
+                            break;
+                        }
                     case 18:
                     case 16:
-                    {
-                        leaderSlots_.AddEntriesFrom(input, _repeated_leaderSlots_codec);
-                        break;
-                    }
+                        {
+                            leaderSlots_.AddEntriesFrom(input, _repeated_leaderSlots_codec);
+                            break;
+                        }
                     case 26:
                     case 24:
-                    {
-                        trainerSlots_.AddEntriesFrom(input, _repeated_trainerSlots_codec);
-                        break;
-                    }
+                        {
+                            trainerSlots_.AddEntriesFrom(input, _repeated_trainerSlots_codec);
+                            break;
+                        }
                     case 34:
                     case 32:
-                    {
-                        searchRollBonus_.AddEntriesFrom(input, _repeated_searchRollBonus_codec);
-                        break;
-                    }
+                        {
+                            searchRollBonus_.AddEntriesFrom(input, _repeated_searchRollBonus_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -21338,32 +21374,32 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         break;
                     case 10:
                     case 8:
-                    {
-                        rankNum_.AddEntriesFrom(input, _repeated_rankNum_codec);
-                        break;
-                    }
+                        {
+                            rankNum_.AddEntriesFrom(input, _repeated_rankNum_codec);
+                            break;
+                        }
                     case 18:
                     case 16:
-                    {
-                        requiredExperience_.AddEntriesFrom(input, _repeated_requiredExperience_codec);
-                        break;
-                    }
+                        {
+                            requiredExperience_.AddEntriesFrom(input, _repeated_requiredExperience_codec);
+                            break;
+                        }
                     case 26:
                     case 29:
-                    {
-                        cpMultiplier_.AddEntriesFrom(input, _repeated_cpMultiplier_codec);
-                        break;
-                    }
+                        {
+                            cpMultiplier_.AddEntriesFrom(input, _repeated_cpMultiplier_codec);
+                            break;
+                        }
                     case 32:
-                    {
-                        MaxEggPlayerLevel = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            MaxEggPlayerLevel = input.ReadInt32();
+                            break;
+                        }
                     case 40:
-                    {
-                        MaxEncounterPlayerLevel = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            MaxEncounterPlayerLevel = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -21447,10 +21483,10 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             new pb::MessageParser<CameraSettings>(() => new CameraSettings());

         private static readonly pb::FieldCodec<global::AllEnum.CameraInterpolation> _repeated_interpolation_codec
-            = pb::FieldCodec.ForEnum(18, x => (int) x, x => (global::AllEnum.CameraInterpolation) x);
+            = pb::FieldCodec.ForEnum(18, x => (int)x, x => (global::AllEnum.CameraInterpolation)x);

         private static readonly pb::FieldCodec<global::AllEnum.CameraTarget> _repeated_targetType_codec
-            = pb::FieldCodec.ForEnum(26, x => (int) x, x => (global::AllEnum.CameraTarget) x);
+            = pb::FieldCodec.ForEnum(26, x => (int)x, x => (global::AllEnum.CameraTarget)x);

         private static readonly pb::FieldCodec<float> _repeated_easeInSpeed_codec
             = pb::FieldCodec.ForFloat(34);
@@ -21756,100 +21792,100 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        NextCamera = input.ReadString();
-                        break;
-                    }
+                        {
+                            NextCamera = input.ReadString();
+                            break;
+                        }
                     case 18:
                     case 16:
-                    {
-                        interpolation_.AddEntriesFrom(input, _repeated_interpolation_codec);
-                        break;
-                    }
+                        {
+                            interpolation_.AddEntriesFrom(input, _repeated_interpolation_codec);
+                            break;
+                        }
                     case 26:
                     case 24:
-                    {
-                        targetType_.AddEntriesFrom(input, _repeated_targetType_codec);
-                        break;
-                    }
+                        {
+                            targetType_.AddEntriesFrom(input, _repeated_targetType_codec);
+                            break;
+                        }
                     case 34:
                     case 37:
-                    {
-                        easeInSpeed_.AddEntriesFrom(input, _repeated_easeInSpeed_codec);
-                        break;
-                    }
+                        {
+                            easeInSpeed_.AddEntriesFrom(input, _repeated_easeInSpeed_codec);
+                            break;
+                        }
                     case 42:
                     case 45:
-                    {
-                        eastOutSpeed_.AddEntriesFrom(input, _repeated_eastOutSpeed_codec);
-                        break;
-                    }
+                        {
+                            eastOutSpeed_.AddEntriesFrom(input, _repeated_eastOutSpeed_codec);
+                            break;
+                        }
                     case 50:
                     case 53:
-                    {
-                        durationSeconds_.AddEntriesFrom(input, _repeated_durationSeconds_codec);
-                        break;
-                    }
+                        {
+                            durationSeconds_.AddEntriesFrom(input, _repeated_durationSeconds_codec);
+                            break;
+                        }
                     case 58:
                     case 61:
-                    {
-                        waitSeconds_.AddEntriesFrom(input, _repeated_waitSeconds_codec);
-                        break;
-                    }
+                        {
+                            waitSeconds_.AddEntriesFrom(input, _repeated_waitSeconds_codec);
+                            break;
+                        }
                     case 66:
                     case 69:
-                    {
-                        transitionSeconds_.AddEntriesFrom(input, _repeated_transitionSeconds_codec);
-                        break;
-                    }
+                        {
+                            transitionSeconds_.AddEntriesFrom(input, _repeated_transitionSeconds_codec);
+                            break;
+                        }
                     case 74:
                     case 77:
-                    {
-                        angleDegree_.AddEntriesFrom(input, _repeated_angleDegree_codec);
-                        break;
-                    }
+                        {
+                            angleDegree_.AddEntriesFrom(input, _repeated_angleDegree_codec);
+                            break;
+                        }
                     case 82:
                     case 85:
-                    {
-                        angleOffsetDegree_.AddEntriesFrom(input, _repeated_angleOffsetDegree_codec);
-                        break;
-                    }
+                        {
+                            angleOffsetDegree_.AddEntriesFrom(input, _repeated_angleOffsetDegree_codec);
+                            break;
+                        }
                     case 90:
                     case 93:
-                    {
-                        pitchDegree_.AddEntriesFrom(input, _repeated_pitchDegree_codec);
-                        break;
-                    }
+                        {
+                            pitchDegree_.AddEntriesFrom(input, _repeated_pitchDegree_codec);
+                            break;
+                        }
                     case 98:
                     case 101:
-                    {
-                        pitchOffsetDegree_.AddEntriesFrom(input, _repeated_pitchOffsetDegree_codec);
-                        break;
-                    }
+                        {
+                            pitchOffsetDegree_.AddEntriesFrom(input, _repeated_pitchOffsetDegree_codec);
+                            break;
+                        }
                     case 106:
                     case 109:
-                    {
-                        rollDegree_.AddEntriesFrom(input, _repeated_rollDegree_codec);
-                        break;
-                    }
+                        {
+                            rollDegree_.AddEntriesFrom(input, _repeated_rollDegree_codec);
+                            break;
+                        }
                     case 114:
                     case 117:
-                    {
-                        distanceMeters_.AddEntriesFrom(input, _repeated_distanceMeters_codec);
-                        break;
-                    }
+                        {
+                            distanceMeters_.AddEntriesFrom(input, _repeated_distanceMeters_codec);
+                            break;
+                        }
                     case 122:
                     case 125:
-                    {
-                        heightPercent_.AddEntriesFrom(input, _repeated_heightPercent_codec);
-                        break;
-                    }
+                        {
+                            heightPercent_.AddEntriesFrom(input, _repeated_heightPercent_codec);
+                            break;
+                        }
                     case 130:
                     case 133:
-                    {
-                        vertCtrRatio_.AddEntriesFrom(input, _repeated_vertCtrRatio_codec);
-                        break;
-                    }
+                        {
+                            vertCtrRatio_.AddEntriesFrom(input, _repeated_vertCtrRatio_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -21981,7 +22017,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (BadgeType != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) BadgeType);
+                output.WriteEnum((int)BadgeType);
             }
             if (BadgeRank != 0)
             {
@@ -21996,7 +22032,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (BadgeType != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) BadgeType);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)BadgeType);
             }
             if (BadgeRank != 0)
             {
@@ -22034,21 +22070,21 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        badgeType_ = (global::AllEnum.BadgeType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            badgeType_ = (global::AllEnum.BadgeType)input.ReadEnum();
+                            break;
+                        }
                     case 16:
-                    {
-                        BadgeRank = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BadgeRank = input.ReadInt32();
+                            break;
+                        }
                     case 26:
                     case 24:
-                    {
-                        targets_.AddEntriesFrom(input, _repeated_targets_codec);
-                        break;
-                    }
+                        {
+                            targets_.AddEntriesFrom(input, _repeated_targets_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -22156,7 +22192,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (AttackType != 0)
             {
                 output.WriteRawTag(16);
-                output.WriteEnum((int) AttackType);
+                output.WriteEnum((int)AttackType);
             }
         }

@@ -22166,7 +22202,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             size += attackScalar_.CalculateSize(_repeated_attackScalar_codec);
             if (AttackType != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AttackType);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)AttackType);
             }
             return size;
         }
@@ -22196,15 +22232,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         break;
                     case 10:
                     case 13:
-                    {
-                        attackScalar_.AddEntriesFrom(input, _repeated_attackScalar_codec);
-                        break;
-                    }
+                        {
+                            attackScalar_.AddEntriesFrom(input, _repeated_attackScalar_codec);
+                            break;
+                        }
                     case 16:
-                    {
-                        attackType_ = (global::AllEnum.PokemonType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            attackType_ = (global::AllEnum.PokemonType)input.ReadEnum();
+                            break;
+                        }
                 }
             }
         }
@@ -22325,10 +22361,10 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 10:
-                    {
-                        sequence_.AddEntriesFrom(input, _repeated_sequence_codec);
-                        break;
-                    }
+                        {
+                            sequence_.AddEntriesFrom(input, _repeated_sequence_codec);
+                            break;
+                        }
                 }
             }
         }
@@ -22587,7 +22623,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (MovementId != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) MovementId);
+                output.WriteEnum((int)MovementId);
             }
             if (AnimationId != 0)
             {
@@ -22597,7 +22633,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (PokemonType != 0)
             {
                 output.WriteRawTag(24);
-                output.WriteEnum((int) PokemonType);
+                output.WriteEnum((int)PokemonType);
             }
             if (Power != 0F)
             {
@@ -22666,7 +22702,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (MovementId != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MovementId);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)MovementId);
             }
             if (AnimationId != 0)
             {
@@ -22674,7 +22710,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (PokemonType != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PokemonType);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)PokemonType);
             }
             if (Power != 0F)
             {
@@ -22806,80 +22842,80 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        movementId_ = (global::AllEnum.PokemonMovementType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            movementId_ = (global::AllEnum.PokemonMovementType)input.ReadEnum();
+                            break;
+                        }
                     case 16:
-                    {
-                        AnimationId = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            AnimationId = input.ReadInt32();
+                            break;
+                        }
                     case 24:
-                    {
-                        pokemonType_ = (global::AllEnum.PokemonType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            pokemonType_ = (global::AllEnum.PokemonType)input.ReadEnum();
+                            break;
+                        }
                     case 37:
-                    {
-                        Power = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            Power = input.ReadFloat();
+                            break;
+                        }
                     case 45:
-                    {
-                        AccuracyChance = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            AccuracyChance = input.ReadFloat();
+                            break;
+                        }
                     case 53:
-                    {
-                        CriticalChance = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            CriticalChance = input.ReadFloat();
+                            break;
+                        }
                     case 61:
-                    {
-                        HealScalar = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            HealScalar = input.ReadFloat();
+                            break;
+                        }
                     case 69:
-                    {
-                        StaminaLossScalar = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            StaminaLossScalar = input.ReadFloat();
+                            break;
+                        }
                     case 72:
-                    {
-                        TrainerLevelMin = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            TrainerLevelMin = input.ReadInt32();
+                            break;
+                        }
                     case 80:
-                    {
-                        TrainerLevelMax = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            TrainerLevelMax = input.ReadInt32();
+                            break;
+                        }
                     case 90:
-                    {
-                        VfxName = input.ReadString();
-                        break;
-                    }
+                        {
+                            VfxName = input.ReadString();
+                            break;
+                        }
                     case 96:
-                    {
-                        DurationMs = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            DurationMs = input.ReadInt32();
+                            break;
+                        }
                     case 104:
-                    {
-                        DamageWindowStartMs = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            DamageWindowStartMs = input.ReadInt32();
+                            break;
+                        }
                     case 112:
-                    {
-                        DamageWindowEndMs = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            DamageWindowEndMs = input.ReadInt32();
+                            break;
+                        }
                     case 120:
-                    {
-                        EnergyDelta = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            EnergyDelta = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -22988,16 +23024,16 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             new pb::MessageParser<PokemonSettings>(() => new PokemonSettings());

         private static readonly pb::FieldCodec<global::AllEnum.PokemonMove> _repeated_quickMoves_codec
-            = pb::FieldCodec.ForEnum(74, x => (int) x, x => (global::AllEnum.PokemonMove) x);
+            = pb::FieldCodec.ForEnum(74, x => (int)x, x => (global::AllEnum.PokemonMove)x);

         private static readonly pb::FieldCodec<global::AllEnum.PokemonMove> _repeated_cinematicMoves_codec
-            = pb::FieldCodec.ForEnum(82, x => (int) x, x => (global::AllEnum.PokemonMove) x);
+            = pb::FieldCodec.ForEnum(82, x => (int)x, x => (global::AllEnum.PokemonMove)x);

         private static readonly pb::FieldCodec<float> _repeated_animationTime_codec
             = pb::FieldCodec.ForFloat(90);

         private static readonly pb::FieldCodec<global::AllEnum.PokemonId> _repeated_evolutionIds_codec
-            = pb::FieldCodec.ForEnum(98, x => (int) x, x => (global::AllEnum.PokemonId) x);
+            = pb::FieldCodec.ForEnum(98, x => (int)x, x => (global::AllEnum.PokemonId)x);

         private readonly pbc::RepeatedField<float> animationTime_ = new pbc::RepeatedField<float>();

@@ -23239,7 +23275,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (PokemonId != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) PokemonId);
+                output.WriteEnum((int)PokemonId);
             }
             if (ModelScale != 0F)
             {
@@ -23249,12 +23285,12 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Type != 0)
             {
                 output.WriteRawTag(32);
-                output.WriteEnum((int) Type);
+                output.WriteEnum((int)Type);
             }
             if (Type2 != 0)
             {
                 output.WriteRawTag(40);
-                output.WriteEnum((int) Type2);
+                output.WriteEnum((int)Type2);
             }
             if (camera_ != null)
             {
@@ -23283,7 +23319,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (Class != 0)
             {
                 output.WriteRawTag(112);
-                output.WriteEnum((int) Class);
+                output.WriteEnum((int)Class);
             }
             if (PokedexHeightM != 0F)
             {
@@ -23298,7 +23334,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (ParentPokemonId != 0)
             {
                 output.WriteRawTag(136, 1);
-                output.WriteEnum((int) ParentPokemonId);
+                output.WriteEnum((int)ParentPokemonId);
             }
             if (HeightStdDev != 0F)
             {
@@ -23318,7 +23354,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (FamilyId != 0)
             {
                 output.WriteRawTag(168, 1);
-                output.WriteEnum((int) FamilyId);
+                output.WriteEnum((int)FamilyId);
             }
             if (CandyToEvolve != 0)
             {
@@ -23332,7 +23368,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (PokemonId != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PokemonId);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)PokemonId);
             }
             if (ModelScale != 0F)
             {
@@ -23340,11 +23376,11 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (Type != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Type);
             }
             if (Type2 != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type2);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Type2);
             }
             if (camera_ != null)
             {
@@ -23368,7 +23404,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (Class != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Class);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Class);
             }
             if (PokedexHeightM != 0F)
             {
@@ -23380,7 +23416,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (ParentPokemonId != 0)
             {
-                size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) ParentPokemonId);
+                size += 2 + pb::CodedOutputStream.ComputeEnumSize((int)ParentPokemonId);
             }
             if (HeightStdDev != 0F)
             {
@@ -23396,7 +23432,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (FamilyId != 0)
             {
-                size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) FamilyId);
+                size += 2 + pb::CodedOutputStream.ComputeEnumSize((int)FamilyId);
             }
             if (CandyToEvolve != 0)
             {
@@ -23508,126 +23544,126 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        pokemonId_ = (global::AllEnum.PokemonId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            pokemonId_ = (global::AllEnum.PokemonId)input.ReadEnum();
+                            break;
+                        }
                     case 29:
-                    {
-                        ModelScale = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            ModelScale = input.ReadFloat();
+                            break;
+                        }
                     case 32:
-                    {
-                        type_ = (global::AllEnum.PokemonType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            type_ = (global::AllEnum.PokemonType)input.ReadEnum();
+                            break;
+                        }
                     case 40:
-                    {
-                        type2_ = (global::AllEnum.PokemonType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            type2_ = (global::AllEnum.PokemonType)input.ReadEnum();
+                            break;
+                        }
                     case 50:
-                    {
-                        if (camera_ == null)
                         {
-                            camera_ = new global::PokemonGo.RocketAPI.GeneratedCode.CameraAttributes();
+                            if (camera_ == null)
+                            {
+                                camera_ = new global::PokemonGo.RocketAPI.GeneratedCode.CameraAttributes();
+                            }
+                            input.ReadMessage(camera_);
+                            break;
                         }
-                        input.ReadMessage(camera_);
-                        break;
-                    }
                     case 58:
-                    {
-                        if (encounter_ == null)
                         {
-                            encounter_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterAttributes();
+                            if (encounter_ == null)
+                            {
+                                encounter_ = new global::PokemonGo.RocketAPI.GeneratedCode.EncounterAttributes();
+                            }
+                            input.ReadMessage(encounter_);
+                            break;
                         }
-                        input.ReadMessage(encounter_);
-                        break;
-                    }
                     case 66:
-                    {
-                        if (stats_ == null)
                         {
-                            stats_ = new global::PokemonGo.RocketAPI.GeneratedCode.StatsAttributes();
+                            if (stats_ == null)
+                            {
+                                stats_ = new global::PokemonGo.RocketAPI.GeneratedCode.StatsAttributes();
+                            }
+                            input.ReadMessage(stats_);
+                            break;
                         }
-                        input.ReadMessage(stats_);
-                        break;
-                    }
                     case 74:
                     case 72:
-                    {
-                        quickMoves_.AddEntriesFrom(input, _repeated_quickMoves_codec);
-                        break;
-                    }
+                        {
+                            quickMoves_.AddEntriesFrom(input, _repeated_quickMoves_codec);
+                            break;
+                        }
                     case 82:
                     case 80:
-                    {
-                        cinematicMoves_.AddEntriesFrom(input, _repeated_cinematicMoves_codec);
-                        break;
-                    }
+                        {
+                            cinematicMoves_.AddEntriesFrom(input, _repeated_cinematicMoves_codec);
+                            break;
+                        }
                     case 90:
                     case 93:
-                    {
-                        animationTime_.AddEntriesFrom(input, _repeated_animationTime_codec);
-                        break;
-                    }
+                        {
+                            animationTime_.AddEntriesFrom(input, _repeated_animationTime_codec);
+                            break;
+                        }
                     case 98:
                     case 96:
-                    {
-                        evolutionIds_.AddEntriesFrom(input, _repeated_evolutionIds_codec);
-                        break;
-                    }
+                        {
+                            evolutionIds_.AddEntriesFrom(input, _repeated_evolutionIds_codec);
+                            break;
+                        }
                     case 104:
-                    {
-                        EvolutionPips = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            EvolutionPips = input.ReadInt32();
+                            break;
+                        }
                     case 112:
-                    {
-                        class_ = (global::AllEnum.PokemonClass) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            class_ = (global::AllEnum.PokemonClass)input.ReadEnum();
+                            break;
+                        }
                     case 125:
-                    {
-                        PokedexHeightM = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            PokedexHeightM = input.ReadFloat();
+                            break;
+                        }
                     case 133:
-                    {
-                        PokedexWeightKg = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            PokedexWeightKg = input.ReadFloat();
+                            break;
+                        }
                     case 136:
-                    {
-                        parentPokemonId_ = (global::AllEnum.PokemonId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            parentPokemonId_ = (global::AllEnum.PokemonId)input.ReadEnum();
+                            break;
+                        }
                     case 149:
-                    {
-                        HeightStdDev = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            HeightStdDev = input.ReadFloat();
+                            break;
+                        }
                     case 157:
-                    {
-                        WeightStdDev = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            WeightStdDev = input.ReadFloat();
+                            break;
+                        }
                     case 165:
-                    {
-                        KmDistanceToHatch = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            KmDistanceToHatch = input.ReadFloat();
+                            break;
+                        }
                     case 168:
-                    {
-                        familyId_ = (global::AllEnum.PokemonFamilyId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            familyId_ = (global::AllEnum.PokemonFamilyId)input.ReadEnum();
+                            break;
+                        }
                     case 176:
-                    {
-                        CandyToEvolve = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            CandyToEvolve = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -23875,30 +23911,30 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 13:
-                    {
-                        DiskRadiusM = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            DiskRadiusM = input.ReadFloat();
+                            break;
+                        }
                     case 21:
-                    {
-                        CylinderRadiusM = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            CylinderRadiusM = input.ReadFloat();
+                            break;
+                        }
                     case 29:
-                    {
-                        CylinderHeightM = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            CylinderHeightM = input.ReadFloat();
+                            break;
+                        }
                     case 37:
-                    {
-                        CylinderGroundM = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            CylinderGroundM = input.ReadFloat();
+                            break;
+                        }
                     case 45:
-                    {
-                        ShoulderModeScale = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            ShoulderModeScale = input.ReadFloat();
+                            break;
+                        }
                 }
             }
         }
@@ -24114,7 +24150,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (MovementType != 0)
             {
                 output.WriteRawTag(48);
-                output.WriteEnum((int) MovementType);
+                output.WriteEnum((int)MovementType);
             }
             if (MovementTimerS != 0F)
             {
@@ -24158,7 +24194,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (MovementType != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MovementType);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)MovementType);
             }
             if (MovementTimerS != 0F)
             {
@@ -24230,50 +24266,50 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 13:
-                    {
-                        BaseCaptureRate = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            BaseCaptureRate = input.ReadFloat();
+                            break;
+                        }
                     case 21:
-                    {
-                        BaseFleeRate = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            BaseFleeRate = input.ReadFloat();
+                            break;
+                        }
                     case 29:
-                    {
-                        CollisionRadiusM = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            CollisionRadiusM = input.ReadFloat();
+                            break;
+                        }
                     case 37:
-                    {
-                        CollisionHeightM = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            CollisionHeightM = input.ReadFloat();
+                            break;
+                        }
                     case 45:
-                    {
-                        CollisionHeadRadiusM = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            CollisionHeadRadiusM = input.ReadFloat();
+                            break;
+                        }
                     case 48:
-                    {
-                        movementType_ = (global::AllEnum.PokemonMovementType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            movementType_ = (global::AllEnum.PokemonMovementType)input.ReadEnum();
+                            break;
+                        }
                     case 61:
-                    {
-                        MovementTimerS = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            MovementTimerS = input.ReadFloat();
+                            break;
+                        }
                     case 69:
-                    {
-                        JumpTimeS = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            JumpTimeS = input.ReadFloat();
+                            break;
+                        }
                     case 77:
-                    {
-                        AttackTimerS = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            AttackTimerS = input.ReadFloat();
+                            break;
+                        }
                 }
             }
         }
@@ -24484,25 +24520,25 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        BaseStamina = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BaseStamina = input.ReadInt32();
+                            break;
+                        }
                     case 16:
-                    {
-                        BaseAttack = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BaseAttack = input.ReadInt32();
+                            break;
+                        }
                     case 24:
-                    {
-                        BaseDefense = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BaseDefense = input.ReadInt32();
+                            break;
+                        }
                     case 64:
-                    {
-                        DodgeEnergyDelta = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            DodgeEnergyDelta = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -24764,17 +24800,17 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (ItemId != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) ItemId);
+                output.WriteEnum((int)ItemId);
             }
             if (ItemType != 0)
             {
                 output.WriteRawTag(16);
-                output.WriteEnum((int) ItemType);
+                output.WriteEnum((int)ItemType);
             }
             if (Category != 0)
             {
                 output.WriteRawTag(24);
-                output.WriteEnum((int) Category);
+                output.WriteEnum((int)Category);
             }
             if (DropFreq != 0F)
             {
@@ -24843,15 +24879,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (ItemId != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ItemId);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)ItemId);
             }
             if (ItemType != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ItemType);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)ItemType);
             }
             if (Category != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Category);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Category);
             }
             if (DropFreq != 0F)
             {
@@ -25023,121 +25059,121 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        itemId_ = (global::AllEnum.ItemId) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            itemId_ = (global::AllEnum.ItemId)input.ReadEnum();
+                            break;
+                        }
                     case 16:
-                    {
-                        itemType_ = (global::AllEnum.ItemType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            itemType_ = (global::AllEnum.ItemType)input.ReadEnum();
+                            break;
+                        }
                     case 24:
-                    {
-                        category_ = (global::AllEnum.ItemCategory) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            category_ = (global::AllEnum.ItemCategory)input.ReadEnum();
+                            break;
+                        }
                     case 37:
-                    {
-                        DropFreq = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            DropFreq = input.ReadFloat();
+                            break;
+                        }
                     case 40:
-                    {
-                        DropTrainerLevel = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            DropTrainerLevel = input.ReadInt32();
+                            break;
+                        }
                     case 50:
-                    {
-                        if (pokeball_ == null)
                         {
-                            pokeball_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokeballAttributes();
+                            if (pokeball_ == null)
+                            {
+                                pokeball_ = new global::PokemonGo.RocketAPI.GeneratedCode.PokeballAttributes();
+                            }
+                            input.ReadMessage(pokeball_);
+                            break;
                         }
-                        input.ReadMessage(pokeball_);
-                        break;
-                    }
                     case 58:
-                    {
-                        if (potion_ == null)
                         {
-                            potion_ = new global::PokemonGo.RocketAPI.GeneratedCode.PotionAttributes();
+                            if (potion_ == null)
+                            {
+                                potion_ = new global::PokemonGo.RocketAPI.GeneratedCode.PotionAttributes();
+                            }
+                            input.ReadMessage(potion_);
+                            break;
                         }
-                        input.ReadMessage(potion_);
-                        break;
-                    }
                     case 66:
-                    {
-                        if (revive_ == null)
                         {
-                            revive_ = new global::PokemonGo.RocketAPI.GeneratedCode.ReviveAttributes();
+                            if (revive_ == null)
+                            {
+                                revive_ = new global::PokemonGo.RocketAPI.GeneratedCode.ReviveAttributes();
+                            }
+                            input.ReadMessage(revive_);
+                            break;
                         }
-                        input.ReadMessage(revive_);
-                        break;
-                    }
                     case 74:
-                    {
-                        if (battle_ == null)
                         {
-                            battle_ = new global::PokemonGo.RocketAPI.GeneratedCode.BattleAttributes();
+                            if (battle_ == null)
+                            {
+                                battle_ = new global::PokemonGo.RocketAPI.GeneratedCode.BattleAttributes();
+                            }
+                            input.ReadMessage(battle_);
+                            break;
                         }
-                        input.ReadMessage(battle_);
-                        break;
-                    }
                     case 82:
-                    {
-                        if (food_ == null)
                         {
-                            food_ = new global::PokemonGo.RocketAPI.GeneratedCode.FoodAttributes();
+                            if (food_ == null)
+                            {
+                                food_ = new global::PokemonGo.RocketAPI.GeneratedCode.FoodAttributes();
+                            }
+                            input.ReadMessage(food_);
+                            break;
                         }
-                        input.ReadMessage(food_);
-                        break;
-                    }
                     case 90:
-                    {
-                        if (inventoryUpgrade_ == null)
                         {
-                            inventoryUpgrade_ =
-                                new global::PokemonGo.RocketAPI.GeneratedCode.InventoryUpgradeAttributes();
+                            if (inventoryUpgrade_ == null)
+                            {
+                                inventoryUpgrade_ =
+                                    new global::PokemonGo.RocketAPI.GeneratedCode.InventoryUpgradeAttributes();
+                            }
+                            input.ReadMessage(inventoryUpgrade_);
+                            break;
                         }
-                        input.ReadMessage(inventoryUpgrade_);
-                        break;
-                    }
                     case 98:
-                    {
-                        if (xpBoost_ == null)
                         {
-                            xpBoost_ = new global::PokemonGo.RocketAPI.GeneratedCode.ExperienceBoostAttributes();
+                            if (xpBoost_ == null)
+                            {
+                                xpBoost_ = new global::PokemonGo.RocketAPI.GeneratedCode.ExperienceBoostAttributes();
+                            }
+                            input.ReadMessage(xpBoost_);
+                            break;
                         }
-                        input.ReadMessage(xpBoost_);
-                        break;
-                    }
                     case 106:
-                    {
-                        if (incense_ == null)
                         {
-                            incense_ = new global::PokemonGo.RocketAPI.GeneratedCode.IncenseAttributes();
+                            if (incense_ == null)
+                            {
+                                incense_ = new global::PokemonGo.RocketAPI.GeneratedCode.IncenseAttributes();
+                            }
+                            input.ReadMessage(incense_);
+                            break;
                         }
-                        input.ReadMessage(incense_);
-                        break;
-                    }
                     case 114:
-                    {
-                        if (eggIncubator_ == null)
                         {
-                            eggIncubator_ = new global::PokemonGo.RocketAPI.GeneratedCode.EggIncubatorAttributes();
+                            if (eggIncubator_ == null)
+                            {
+                                eggIncubator_ = new global::PokemonGo.RocketAPI.GeneratedCode.EggIncubatorAttributes();
+                            }
+                            input.ReadMessage(eggIncubator_);
+                            break;
                         }
-                        input.ReadMessage(eggIncubator_);
-                        break;
-                    }
                     case 122:
-                    {
-                        if (fortModifier_ == null)
                         {
-                            fortModifier_ = new global::PokemonGo.RocketAPI.GeneratedCode.FortModifierAttributes();
+                            if (fortModifier_ == null)
+                            {
+                                fortModifier_ = new global::PokemonGo.RocketAPI.GeneratedCode.FortModifierAttributes();
+                            }
+                            input.ReadMessage(fortModifier_);
+                            break;
                         }
-                        input.ReadMessage(fortModifier_);
-                        break;
-                    }
                 }
             }
         }
@@ -25279,10 +25315,10 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 13:
-                    {
-                        StaPercent = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            StaPercent = input.ReadFloat();
+                            break;
+                        }
                 }
             }
         }
@@ -25397,7 +25433,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (IncubatorType != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) IncubatorType);
+                output.WriteEnum((int)IncubatorType);
             }
             if (Uses != 0)
             {
@@ -25416,7 +25452,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (IncubatorType != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) IncubatorType);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)IncubatorType);
             }
             if (Uses != 0)
             {
@@ -25460,20 +25496,20 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        incubatorType_ = (global::AllEnum.EggIncubatorType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            incubatorType_ = (global::AllEnum.EggIncubatorType)input.ReadEnum();
+                            break;
+                        }
                     case 16:
-                    {
-                        Uses = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Uses = input.ReadInt32();
+                            break;
+                        }
                     case 29:
-                    {
-                        DistanceMultiplier = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            DistanceMultiplier = input.ReadFloat();
+                            break;
+                        }
                 }
             }
         }
@@ -25628,15 +25664,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 13:
-                    {
-                        XpMultiplier = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            XpMultiplier = input.ReadFloat();
+                            break;
+                        }
                     case 16:
-                    {
-                        BoostDurationMs = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            BoostDurationMs = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -25678,7 +25714,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             new pb::MessageParser<FoodAttributes>(() => new FoodAttributes());

         private static readonly pb::FieldCodec<global::AllEnum.ItemEffect> _repeated_itemEffect_codec
-            = pb::FieldCodec.ForEnum(10, x => (int) x, x => (global::AllEnum.ItemEffect) x);
+            = pb::FieldCodec.ForEnum(10, x => (int)x, x => (global::AllEnum.ItemEffect)x);

         private static readonly pb::FieldCodec<float> _repeated_itemEffectPercent_codec
             = pb::FieldCodec.ForFloat(18);
@@ -25802,21 +25838,21 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         break;
                     case 10:
                     case 8:
-                    {
-                        itemEffect_.AddEntriesFrom(input, _repeated_itemEffect_codec);
-                        break;
-                    }
+                        {
+                            itemEffect_.AddEntriesFrom(input, _repeated_itemEffect_codec);
+                            break;
+                        }
                     case 18:
                     case 21:
-                    {
-                        itemEffectPercent_.AddEntriesFrom(input, _repeated_itemEffectPercent_codec);
-                        break;
-                    }
+                        {
+                            itemEffectPercent_.AddEntriesFrom(input, _repeated_itemEffectPercent_codec);
+                            break;
+                        }
                     case 29:
-                    {
-                        GrowthPercent = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            GrowthPercent = input.ReadFloat();
+                            break;
+                        }
                 }
             }
         }
@@ -25971,15 +26007,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        ModifierLifetimeSeconds = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            ModifierLifetimeSeconds = input.ReadInt32();
+                            break;
+                        }
                     case 16:
-                    {
-                        TroyDiskNumPokemonSpawned = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            TroyDiskNumPokemonSpawned = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -26033,7 +26069,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             new pb::MessageParser<IncenseAttributes>(() => new IncenseAttributes());

         private static readonly pb::FieldCodec<global::AllEnum.PokemonType> _repeated_pokemonType_codec
-            = pb::FieldCodec.ForEnum(18, x => (int) x, x => (global::AllEnum.PokemonType) x);
+            = pb::FieldCodec.ForEnum(18, x => (int)x, x => (global::AllEnum.PokemonType)x);

         private readonly pbc::RepeatedField<global::AllEnum.PokemonType> pokemonType_ =
             new pbc::RepeatedField<global::AllEnum.PokemonType>();
@@ -26253,41 +26289,41 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        IncenseLifetimeSeconds = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            IncenseLifetimeSeconds = input.ReadInt32();
+                            break;
+                        }
                     case 18:
                     case 16:
-                    {
-                        pokemonType_.AddEntriesFrom(input, _repeated_pokemonType_codec);
-                        break;
-                    }
+                        {
+                            pokemonType_.AddEntriesFrom(input, _repeated_pokemonType_codec);
+                            break;
+                        }
                     case 29:
-                    {
-                        PokemonIncenseTypeProbability = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            PokemonIncenseTypeProbability = input.ReadFloat();
+                            break;
+                        }
                     case 32:
-                    {
-                        StandingTimeBetweenEncountersSeconds = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            StandingTimeBetweenEncountersSeconds = input.ReadInt32();
+                            break;
+                        }
                     case 40:
-                    {
-                        MovingTimeBetweenEncounterSeconds = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            MovingTimeBetweenEncounterSeconds = input.ReadInt32();
+                            break;
+                        }
                     case 48:
-                    {
-                        DistanceRequiredForShorterIntervalMeters = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            DistanceRequiredForShorterIntervalMeters = input.ReadInt32();
+                            break;
+                        }
                     case 56:
-                    {
-                        PokemonAttractedLengthSec = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            PokemonAttractedLengthSec = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -26402,7 +26438,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (UpgradeType != 0)
             {
                 output.WriteRawTag(16);
-                output.WriteEnum((int) UpgradeType);
+                output.WriteEnum((int)UpgradeType);
             }
         }

@@ -26415,7 +26451,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             }
             if (UpgradeType != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) UpgradeType);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)UpgradeType);
             }
             return size;
         }
@@ -26447,15 +26483,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        AdditionalStorage = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            AdditionalStorage = input.ReadInt32();
+                            break;
+                        }
                     case 16:
-                    {
-                        upgradeType_ = (global::AllEnum.InventoryUpgradeType) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            upgradeType_ = (global::AllEnum.InventoryUpgradeType)input.ReadEnum();
+                            break;
+                        }
                 }
             }
         }
@@ -26583,7 +26619,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             if (ItemEffect != 0)
             {
                 output.WriteRawTag(8);
-                output.WriteEnum((int) ItemEffect);
+                output.WriteEnum((int)ItemEffect);
             }
             if (CaptureMulti != 0F)
             {
@@ -26607,7 +26643,7 @@ namespace PokemonGo.RocketAPI.GeneratedCode
             var size = 0;
             if (ItemEffect != 0)
             {
-                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ItemEffect);
+                size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)ItemEffect);
             }
             if (CaptureMulti != 0F)
             {
@@ -26659,25 +26695,25 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        itemEffect_ = (global::AllEnum.ItemEffect) input.ReadEnum();
-                        break;
-                    }
+                        {
+                            itemEffect_ = (global::AllEnum.ItemEffect)input.ReadEnum();
+                            break;
+                        }
                     case 21:
-                    {
-                        CaptureMulti = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            CaptureMulti = input.ReadFloat();
+                            break;
+                        }
                     case 29:
-                    {
-                        CaptureMultiEffect = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            CaptureMultiEffect = input.ReadFloat();
+                            break;
+                        }
                     case 37:
-                    {
-                        ItemEffectMod = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            ItemEffectMod = input.ReadFloat();
+                            break;
+                        }
                 }
             }
         }
@@ -26833,15 +26869,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 13:
-                    {
-                        StaPercent = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            StaPercent = input.ReadFloat();
+                            break;
+                        }
                     case 16:
-                    {
-                        StaAmount = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            StaAmount = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -26970,10 +27006,10 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 13:
-                    {
-                        StaPercent = input.ReadFloat();
-                        break;
-                    }
+                        {
+                            StaPercent = input.ReadFloat();
+                            break;
+                        }
                 }
             }
         }
@@ -27104,10 +27140,10 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 9:
-                    {
-                        PokemonId = input.ReadFixed64();
-                        break;
-                    }
+                        {
+                            PokemonId = input.ReadFixed64();
+                            break;
+                        }
                 }
             }
         }
@@ -27260,15 +27296,15 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        Status = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Status = input.ReadInt32();
+                            break;
+                        }
                     case 16:
-                    {
-                        CandyAwarded = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            CandyAwarded = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
@@ -27400,10 +27436,10 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 9:
-                    {
-                        PokemonId = input.ReadFixed64();
-                        break;
-                    }
+                        {
+                            PokemonId = input.ReadFixed64();
+                            break;
+                        }
                 }
             }
         }
@@ -27610,29 +27646,29 @@ namespace PokemonGo.RocketAPI.GeneratedCode
                         input.SkipLastField();
                         break;
                     case 8:
-                    {
-                        Result = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            Result = input.ReadInt32();
+                            break;
+                        }
                     case 18:
-                    {
-                        if (evolvedPokemon_ == null)
                         {
-                            evolvedPokemon_ = new global::PokemonGo.RocketAPI.GeneratedCode.Pokemon();
+                            if (evolvedPokemon_ == null)
+                            {
+                                evolvedPokemon_ = new global::PokemonGo.RocketAPI.GeneratedCode.Pokemon();
+                            }
+                            input.ReadMessage(evolvedPokemon_);
+                            break;
                         }
-                        input.ReadMessage(evolvedPokemon_);
-                        break;
-                    }
                     case 24:
-                    {
-                        ExpAwarded = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            ExpAwarded = input.ReadInt32();
+                            break;
+                        }
                     case 32:
-                    {
-                        CandyAwarded = input.ReadInt32();
-                        break;
-                    }
+                        {
+                            CandyAwarded = input.ReadInt32();
+                            break;
+                        }
                 }
             }
         }
diff --git a/PokemonGo/RocketAPI/Helpers/JsonHelper.cs b/PokemonGo/RocketAPI/Helpers/JsonHelper.cs
deleted file mode 100644
index 2dd2fcd..0000000
--- a/PokemonGo/RocketAPI/Helpers/JsonHelper.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-#region
-
-using Newtonsoft.Json.Linq;
-
-#endregion
-
-namespace PokemonGo.RocketAPI.Helpers
-{
-    public class JsonHelper
-    {
-        public static string GetValue(string json, string key)
-        {
-            var jObject = JObject.Parse(json);
-            return jObject[key].ToString();
-        }
-    }
-}
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/ILatLong.cs b/PokemonGo/RocketAPI/ILatLong.cs
new file mode 100644
index 0000000..c0fd3fc
--- /dev/null
+++ b/PokemonGo/RocketAPI/ILatLong.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PokemonGo.RocketAPI
+{
+    public interface ILatLong
+    {
+        double Latitude { get; }
+        double Longitude { get; }
+    }
+
+    public class LatLong : Tuple<double, double>, ILatLong
+    {
+        public LatLong(double item1, double item2) : base(item1, item2)
+        {
+        }
+
+        public double Latitude
+        {
+            get
+            {
+                return this.Item1;
+            }
+        }
+        public double Longitude
+        {
+            get
+            {
+                return this.Item2;
+            }
+        }
+    }
+}
diff --git a/PokemonGo/RocketAPI/ISettings.cs b/PokemonGo/RocketAPI/ISettings.cs
index edec062..6174471 100644
--- a/PokemonGo/RocketAPI/ISettings.cs
+++ b/PokemonGo/RocketAPI/ISettings.cs
@@ -18,7 +18,7 @@ namespace PokemonGo.RocketAPI
         string GoogleRefreshToken { get; set; }
         string PtcPassword { get; }
         string PtcUsername { get; }
-        string Email { get;  }
+        string Email { get; }
         string Password { get; }
         bool EvolveAllGivenPokemons { get; }
         string TransferType { get; }
diff --git a/PokemonGo/RocketAPI/Login/GoogleLogin.cs b/PokemonGo/RocketAPI/Login/GoogleLogin.cs
index c91f726..10c9c70 100644
--- a/PokemonGo/RocketAPI/Login/GoogleLogin.cs
+++ b/PokemonGo/RocketAPI/Login/GoogleLogin.cs
@@ -1,115 +1,180 @@
-#region
-
+using PokemonGo.RocketAPI.Exceptions;
 using System;
 using System.Collections.Generic;
-using System.Diagnostics;
-using System.Threading;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Security.Cryptography;
+using System.Text;
 using System.Threading.Tasks;
-using System.Windows.Forms;
-using PokemonGo.RocketAPI.Helpers;
-using System.IO;
-
-
-#endregion

 namespace PokemonGo.RocketAPI.Login
 {
-    public static class GoogleLogin
+    public class GoogleLogin : ILoginType
     {
-        private const string OauthTokenEndpoint = "https://www.googleapis.com/oauth2/v4/token";
-        private const string OauthEndpoint = "https://accounts.google.com/o/oauth2/device/code";
-        private const string ClientId = "848232511240-73ri3t7plvk96pj4f85uj8otdat2alem.apps.googleusercontent.com";
-        private const string ClientSecret = "NCjF1TLi2CcY6t5mt0ZveuL7";
-
-        /// <summary>
-        ///     Gets the access token from Google
-        /// </summary>
-        /// <param name="deviceCode"></param>
-        /// <returns>tokenResponse</returns>
-        public static async Task<TokenResponseModel> GetAccessToken(DeviceCodeModel deviceCode)
-        {
-            //Poll until user submitted code..
-            TokenResponseModel tokenResponse;
-            do
-            {
-                await Task.Delay(2000);
-                tokenResponse = await PollSubmittedToken(deviceCode.device_code);
-            } while (tokenResponse.access_token == null || tokenResponse.refresh_token == null);
+        private readonly string password;
+        private readonly string email;

-            return tokenResponse;
+        public GoogleLogin(string email, string password)
+        {
+            this.email = email;
+            this.password = password;
         }

-        public static async Task<TokenResponseModel> GetAccessToken(string refreshToken)
+        public async Task<string> GetAccessToken()
         {
-            return await HttpClientHelper.PostFormEncodedAsync<TokenResponseModel>(OauthTokenEndpoint,
-                new KeyValuePair<string, string>("access_type", "offline"),
-                new KeyValuePair<string, string>("client_id", ClientId),
-                new KeyValuePair<string, string>("client_secret", ClientSecret),
-                new KeyValuePair<string, string>("refresh_token", refreshToken),
-                new KeyValuePair<string, string>("grant_type", "refresh_token"),
-                new KeyValuePair<string, string>("scope", "openid email https://www.googleapis.com/auth/userinfo.email"));
+            var _GPSOresponse = await PerformMasterLoginAsync(email, password).ConfigureAwait(false);
+            string token;
+            if (!_GPSOresponse.TryGetValue("Token", out token))
+                throw new LoginFailedException();
+
+            var oauthResponse = await PerformOAuthAsync(
+            token,
+            "audience:server:client_id:848232511240-7so421jotr2609rmqakceuu1luuq0ptb.apps.googleusercontent.com",
+            "com.nianticlabs.pokemongo",
+            "321187995bc7cdc2b5fc91b11a96e2baa8602c62",
+            email).ConfigureAwait(false);
+            return oauthResponse["Auth"];
         }

-        public static async Task<DeviceCodeModel> GetDeviceCode()
-        {
-            var deviceCode = await HttpClientHelper.PostFormEncodedAsync<DeviceCodeModel>(OauthEndpoint,
-            new KeyValuePair<string, string>("client_id", ClientId),
-            new KeyValuePair<string, string>("scope", "openid email https://www.googleapis.com/auth/userinfo.email"));
+        private static string b64Key = "AAAAgMom/1a/v0lblO2Ubrt60J2gcuXSljGFQXgcyZWveWLEwo6prwgi3" +
+            "iJIZdodyhKZQrNWp5nKJ3srRXcUW+F1BD3baEVGcmEgqaLZUNBjm057pK" +
+            "RI16kB0YppeGx5qIQ5QjKzsR8ETQbKLNWgRY0QRNVz34kMJR3P/LgHax/" +
+            "6rmf5AAAAAwEAAQ==";
+
+        private static RSAParameters androidKey = GoogleKeyUtils.KeyFromB64(b64Key);

-            try
+        private static string version = "0.0.5";
+        private static string authUrl = "https://android.clients.google.com/auth";
+        private static string userAgent = "GPSOAuthSharp/" + version;
+
+        private async static Task<IDictionary<string, string>> PerformAuthRequestAsync(IDictionary<string, string> data)
+        {
+            var handler = new HttpClientHandler
             {
-                //ColoredConsoleWrite("Google Device Code copied to clipboard");
-                System.Console.WriteLine($"Goto: http://www.google.com/device & enter {deviceCode.user_code}");
-                File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory + @"\Logs.txt", "[" + DateTime.Now.ToString("HH:mm:ss tt") + $"] Goto: http://www.google.com/device & enter {deviceCode.user_code}");
-                Process.Start(@"http://www.google.com/device");
-                var thread = new Thread(() => Clipboard.SetText(deviceCode.user_code)); //Copy device code
-                thread.SetApartmentState(ApartmentState.STA); //Set the thread to STA
-                thread.Start();
-                thread.Join();
-            }
-            catch (Exception)
+                AutomaticDecompression = DecompressionMethods.GZip,
+                AllowAutoRedirect = false
+            };
+            using (var tempHttpClient = new HttpClient(handler))
             {
-                //System.Console.WriteLine("Couldnt copy to clipboard, do it manually");
-                //System.Console.WriteLine($"Goto: http://www.google.com/device & enter {deviceCode.user_code}");
+                tempHttpClient.DefaultRequestHeaders.UserAgent.ParseAdd(userAgent);
+
+                HttpResponseMessage response;
+                using (var formUrlEncodedContent = new FormUrlEncodedContent(data))
+                {
+                    response = await tempHttpClient.PostAsync(authUrl, formUrlEncodedContent).ConfigureAwait(false);
+                }
+
+                var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+                return GoogleKeyUtils.ParseAuthResponse(content);
             }
+        }

-            return deviceCode;
+        private static IDictionary<string, string> GenerateBaseRequest(string email, string encryptedPassword, string service)
+            => new Dictionary<string, string> {
+                { "accountType", "HOSTED_OR_GOOGLE" },
+                { "Email", email },
+                { "has_permission", "1" },
+                { "EncryptedPasswd",  encryptedPassword},
+                { "service", service },
+                { "source", "android" },
+                { "device_country", "us" },
+                { "operatorCountry", "us" },
+                { "lang", "en" },
+                { "sdk_version", "21" }
+            };
+
+        private static Task<IDictionary<string, string>> PerformMasterLoginAsync(string email, string password)
+        {
+            var signature = GoogleKeyUtils.CreateSignature(email, password, androidKey);
+            var request = GenerateBaseRequest(email, signature, "ac2dm");
+            request.Add("add_account", "1");
+            return PerformAuthRequestAsync(request);
         }

-        private static async Task<TokenResponseModel> PollSubmittedToken(string deviceCode)
+        private static Task<IDictionary<string, string>> PerformOAuthAsync(string masterToken, string service, string app, string clientSig, string email)
         {
-            return await HttpClientHelper.PostFormEncodedAsync<TokenResponseModel>(OauthTokenEndpoint,
-                new KeyValuePair<string, string>("client_id", ClientId),
-                new KeyValuePair<string, string>("client_secret", ClientSecret),
-                new KeyValuePair<string, string>("code", deviceCode),
-                new KeyValuePair<string, string>("grant_type", "http://oauth.net/grant_type/device/1.0"),
-                new KeyValuePair<string, string>("scope", "openid email https://www.googleapis.com/auth/userinfo.email"));
+            var request = GenerateBaseRequest(email, masterToken, service);
+            request.Add("app", app);
+            request.Add("client_sig", clientSig);
+            return PerformAuthRequestAsync(request);
         }
+    }

+    internal class GoogleKeyUtils
+    {
+        // key_from_b64
+        // BitConverter has different endianness, hence the Reverse()
+        public static RSAParameters KeyFromB64(string b64Key)
+        {
+            var decoded = Convert.FromBase64String(b64Key);
+            var modLength = BitConverter.ToInt32(decoded.Take(4).Reverse().ToArray(), 0);
+            var mod = decoded.Skip(4).Take(modLength).ToArray();
+            var expLength = BitConverter.ToInt32(decoded.Skip(modLength + 4).Take(4).Reverse().ToArray(), 0);
+            var exponent = decoded.Skip(modLength + 8).Take(expLength).ToArray();
+            var rsaKeyInfo = new RSAParameters
+            {
+                Modulus = mod,
+                Exponent = exponent
+            };
+            return rsaKeyInfo;
+        }

-        internal class ErrorResponseModel
+        // key_to_struct
+        // Python version returns a string, but we use byte[] to get the same results
+        public static byte[] KeyToStruct(RSAParameters key)
         {
-            public string error { get; set; }
-            public string error_description { get; set; }
+            byte[] modLength = { 0x00, 0x00, 0x00, 0x80 };
+            var mod = key.Modulus;
+            byte[] expLength = { 0x00, 0x00, 0x00, 0x03 };
+            var exponent = key.Exponent;
+            return DataTypeUtils.CombineBytes(modLength, mod, expLength, exponent);
         }

-        public class TokenResponseModel
+        // parse_auth_response
+        public static Dictionary<string, string> ParseAuthResponse(string text)
         {
-            public string access_token { get; set; }
-            public string token_type { get; set; }
-            public int expires_in { get; set; }
-            public string refresh_token { get; set; }
-            public string id_token { get; set; }
+            var responseData = new Dictionary<string, string>();
+            foreach (string line in text.Split(new string[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries))
+            {
+                var parts = line.Split('=');
+                responseData.Add(parts[0], parts[1]);
+            }
+            return responseData;
         }

+        // signature
+        public static string CreateSignature(string email, string password, RSAParameters key)
+        {
+            using (var rsa = new RSACryptoServiceProvider())
+            {
+                rsa.ImportParameters(key);
+                var sha1 = SHA1.Create();
+                byte[] prefix = { 0x00 };
+                var hash = sha1.ComputeHash(GoogleKeyUtils.KeyToStruct(key)).Take(4).ToArray();
+                var encrypted = rsa.Encrypt(Encoding.UTF8.GetBytes(email + "\x00" + password), true);
+                return DataTypeUtils.UrlSafeBase64(DataTypeUtils.CombineBytes(prefix, hash, encrypted));
+            }
+        }

-        public class DeviceCodeModel
+        private class DataTypeUtils
         {
-            public string verification_url { get; set; }
-            public int expires_in { get; set; }
-            public int interval { get; set; }
-            public string device_code { get; set; }
-            public string user_code { get; set; }
+            public static string UrlSafeBase64(byte[] byteArray)
+            {
+                return Convert.ToBase64String(byteArray).Replace('+', '-').Replace('/', '_');
+            }
+
+            public static byte[] CombineBytes(params byte[][] arrays)
+            {
+                var rv = new byte[arrays.Sum(a => a.Length)];
+                var offset = 0;
+                foreach (byte[] array in arrays)
+                {
+                    Buffer.BlockCopy(array, 0, rv, offset, array.Length);
+                    offset += array.Length;
+                }
+                return rv;
+            }
         }
     }
 }
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/Login/ILoginType.cs b/PokemonGo/RocketAPI/Login/ILoginType.cs
new file mode 100644
index 0000000..0c102a0
--- /dev/null
+++ b/PokemonGo/RocketAPI/Login/ILoginType.cs
@@ -0,0 +1,16 @@
+using System.Threading.Tasks;
+
+namespace PokemonGo.RocketAPI.Login
+{
+    /// <summary>
+    /// Interface for the login into the game using either Google or PTC
+    /// </summary>
+    interface ILoginType
+    {
+        /// <summary>
+        /// Gets the access token.
+        /// </summary>
+        /// <returns></returns>
+        Task<string> GetAccessToken();
+    }
+}
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/Login/PtcLogin.cs b/PokemonGo/RocketAPI/Login/PtcLogin.cs
index 7a3c900..0cf6b04 100644
--- a/PokemonGo/RocketAPI/Login/PtcLogin.cs
+++ b/PokemonGo/RocketAPI/Login/PtcLogin.cs
@@ -1,20 +1,24 @@
-#region
-
+using Newtonsoft.Json;
+using PokemonGo.RocketAPI.Exceptions;
 using System.Collections.Generic;
 using System.Net;
 using System.Net.Http;
 using System.Threading.Tasks;
 using System.Web;
-using PokemonGo.RocketAPI.Exceptions;
-using PokemonGo.RocketAPI.Helpers;
-
-#endregion

 namespace PokemonGo.RocketAPI.Login
 {
-    internal static class PtcLogin
+    class PtcLogin : ILoginType
     {
-        public static async Task<string> GetAccessToken(string username, string password)
+        readonly string password;
+        readonly string username;
+
+        public PtcLogin(string username, string password)
+        {
+            this.username = username;
+            this.password = password;
+        }
+        public async Task<string> GetAccessToken()
         {
             var handler = new HttpClientHandler
             {
@@ -25,44 +29,88 @@ namespace PokemonGo.RocketAPI.Login
             using (var tempHttpClient = new HttpClient(handler))
             {
                 //Get session cookie
-                var sessionResp = await tempHttpClient.GetAsync(Resources.PtcLoginUrl);
-                var data = await sessionResp.Content.ReadAsStringAsync();
-                var lt = JsonHelper.GetValue(data, "lt");
-                var executionId = JsonHelper.GetValue(data, "execution");
+                var sessionData = await GetSessionCookie(tempHttpClient).ConfigureAwait(false);

                 //Login
-                var loginResp = await tempHttpClient.PostAsync(Resources.PtcLoginUrl,
-                    new FormUrlEncodedContent(
-                        new[]
-                        {
-                            new KeyValuePair<string, string>("lt", lt),
-                            new KeyValuePair<string, string>("execution", executionId),
-                            new KeyValuePair<string, string>("_eventId", "submit"),
-                            new KeyValuePair<string, string>("username", username),
-                            new KeyValuePair<string, string>("password", password)
-                        }));
-
-                var ticketId = HttpUtility.ParseQueryString(loginResp.Headers.Location.Query)["ticket"];
-                if (ticketId == null)
-                    throw new PtcOfflineException();
-
-                //Get tokenvar
-                var tokenResp = await tempHttpClient.PostAsync(Resources.PtcLoginOauth,
-                    new FormUrlEncodedContent(
-                        new[]
-                        {
-                            new KeyValuePair<string, string>("client_id", "mobile-app_pokemon-go"),
-                            new KeyValuePair<string, string>("redirect_uri",
-                                "https://www.nianticlabs.com/pokemongo/error"),
-                            new KeyValuePair<string, string>("client_secret",
-                                "w8ScCUXJQc6kXKw8FiOhd8Fixzht18Dq3PEVkUCP5ZPxtgyWsbTvWHFLm2wNY0JR"),
-                            new KeyValuePair<string, string>("grant_type", "refresh_token"),
-                            new KeyValuePair<string, string>("code", ticketId)
-                        }));
-
-                var tokenData = await tokenResp.Content.ReadAsStringAsync();
-                return HttpUtility.ParseQueryString(tokenData)["access_token"];
+                var ticketId = await GetLoginTicket(username, password, tempHttpClient, sessionData).ConfigureAwait(false);
+
+                //Get tokenvar
+                return await GetToken(tempHttpClient, ticketId).ConfigureAwait(false);
+            }
+        }
+
+        private static string ExtracktTicketFromResponse(HttpResponseMessage loginResp)
+        {
+            var location = loginResp.Headers.Location;
+            if (location == null)
+                throw new LoginFailedException();
+
+            var ticketId = HttpUtility.ParseQueryString(location.Query)["ticket"];
+
+            if (ticketId == null)
+                throw new PtcOfflineException();
+
+            return ticketId;
+        }
+
+        private static IDictionary<string, string> GenerateLoginRequest(SessionData sessionData, string user, string pass)
+            => new Dictionary<string, string>
+            {
+                { "lt", sessionData.Lt },
+                { "execution", sessionData.Execution },
+                { "_eventId", "submit" },
+                { "username", user },
+                { "password", pass }
+            };
+
+        private static IDictionary<string, string> GenerateTokenVarRequest(string ticketId)
+            => new Dictionary<string, string>
+            {
+                {"client_id", "mobile-app_pokemon-go"},
+                {"redirect_uri", "https://www.nianticlabs.com/pokemongo/error"},
+                {"client_secret", "w8ScCUXJQc6kXKw8FiOhd8Fixzht18Dq3PEVkUCP5ZPxtgyWsbTvWHFLm2wNY0JR"},
+                {"grant_type", "refresh_token"},
+                {"code", ticketId}
+            };
+
+        private static async Task<string> GetLoginTicket(string username, string password, HttpClient tempHttpClient, SessionData sessionData)
+        {
+            HttpResponseMessage loginResp;
+            var loginRequest = GenerateLoginRequest(sessionData, username, password);
+            using (var formUrlEncodedContent = new FormUrlEncodedContent(loginRequest))
+            {
+                loginResp = await tempHttpClient.PostAsync(Resources.PtcLoginUrl, formUrlEncodedContent).ConfigureAwait(false);
             }
+
+            var ticketId = ExtracktTicketFromResponse(loginResp);
+            return ticketId;
+        }
+
+        private static async Task<SessionData> GetSessionCookie(HttpClient tempHttpClient)
+        {
+            var sessionResp = await tempHttpClient.GetAsync(Resources.PtcLoginUrl).ConfigureAwait(false);
+            var data = await sessionResp.Content.ReadAsStringAsync().ConfigureAwait(false);
+            var sessionData = JsonConvert.DeserializeObject<SessionData>(data);
+            return sessionData;
+        }
+
+        private static async Task<string> GetToken(HttpClient tempHttpClient, string ticketId)
+        {
+            HttpResponseMessage tokenResp;
+            var tokenRequest = GenerateTokenVarRequest(ticketId);
+            using (var formUrlEncodedContent = new FormUrlEncodedContent(tokenRequest))
+            {
+                tokenResp = await tempHttpClient.PostAsync(Resources.PtcLoginOauth, formUrlEncodedContent).ConfigureAwait(false);
+            }
+
+            var tokenData = await tokenResp.Content.ReadAsStringAsync().ConfigureAwait(false);
+            return HttpUtility.ParseQueryString(tokenData)["access_token"];
+        }
+
+        private class SessionData
+        {
+            public string Lt { get; set; }
+            public string Execution { get; set; }
         }
     }
-}
+}
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/PokemonGo.RocketAPI.csproj b/PokemonGo/RocketAPI/PokemonGo.RocketAPI.csproj
index abde253..8a6404d 100644
--- a/PokemonGo/RocketAPI/PokemonGo.RocketAPI.csproj
+++ b/PokemonGo/RocketAPI/PokemonGo.RocketAPI.csproj
@@ -44,7 +44,7 @@
       <Private>True</Private>
     </Reference>
     <Reference Include="S2Geometry, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\S2Geometry.1.0.1\lib\portable-net45+wp8+win8\S2Geometry.dll</HintPath>
+      <HintPath>..\..\packages\S2Geometry.1.0.3\lib\portable-net45+wp8+win8\S2Geometry.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="System" />
@@ -68,30 +68,33 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Extensions\LatLongExtensions.cs" />
+    <Compile Include="ILatLong.cs" />
     <Compile Include="Enums\AuthType.cs" />
     <Compile Include="Enums\MiscEnums.cs" />
     <Compile Include="Enums\RequestType.cs" />
+    <Compile Include="Exceptions\LoginFailedException.cs" />
     <Compile Include="Exceptions\PtcOfflineException.cs" />
     <Compile Include="Extensions\DateTimeExtensions.cs" />
     <Compile Include="GeneratedCode\AllEnum.cs" />
     <Compile Include="GeneratedCode\Payloads.cs" />
     <Compile Include="GeneratedCode\Request.cs" />
     <Compile Include="GeneratedCode\Response.cs" />
-    <Compile Include="GPSOAuthSharp.cs" />
     <Compile Include="Helpers\HttpClientHelper.cs" />
-    <Compile Include="Helpers\JsonHelper.cs" />
     <Compile Include="Helpers\ProtoHelper.cs" />
     <Compile Include="Helpers\RetryHandler.cs" />
     <Compile Include="Helpers\S2Helper.cs" />
     <Compile Include="Helpers\Utils.cs" />
     <Compile Include="ISettings.cs" />
     <Compile Include="Login\GoogleLogin.cs" />
+    <Compile Include="Login\ILoginType.cs" />
     <Compile Include="Login\PtcLogin.cs" />
     <None Include="app.config" />
     <Compile Include="Client.cs" />
     <Compile Include="Extensions\HttpClientExtensions.cs" />
     <Compile Include="Helpers\RandomHelper.cs" />
     <Compile Include="Helpers\RequestBuilder.cs" />
+    <Compile Include="ProtoAdditions.cs" />
     <Compile Include="Resources.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
diff --git a/PokemonGo/RocketAPI/ProtoAdditions.cs b/PokemonGo/RocketAPI/ProtoAdditions.cs
new file mode 100644
index 0000000..ea0ecf2
--- /dev/null
+++ b/PokemonGo/RocketAPI/ProtoAdditions.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PokemonGo.RocketAPI.GeneratedCode
+{
+    public partial class FortData : ILatLong { }
+
+    public partial class MapPokemon : ILatLong { }
+
+    public partial class WildPokemon : ILatLong { }
+
+    public partial class SpawnPoint : ILatLong { }
+
+}
diff --git a/PokemonGo/RocketAPI/Window/App.config b/PokemonGo/RocketAPI/Window/App.config
index a3cf5c7..3842152 100644
--- a/PokemonGo/RocketAPI/Window/App.config
+++ b/PokemonGo/RocketAPI/Window/App.config
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <configuration>
-    <startup>
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
-    </startup>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+  </startup>
   <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
       <dependentAssembly>
@@ -55,5 +55,17 @@
     <!--Only visit pokestop and collect items-->
     <add key="EvolveAllGivenPokemons" value="false" />
     <add key="ClientSettingsProvider.ServiceUri" value="" />
+
+    <add key="MaxItemPokeBall" value="100"/>
+    <add key="MaxItemGreatBall" value="100"/>
+    <add key="MaxItemUltraBall" value="100"/>
+    <add key="MaxItemMasterBall" value="200"/>
+    <add key="MaxItemRazzBerry" value="100"/>
+    <add key="MaxItemRevive" value="20"/>
+    <add key="MaxItemPotion" value="0"/>
+    <add key="MaxItemSuperPotion" value="0"/>
+    <add key="MaxItemHyperPotion" value="50"/>
+    <add key="MaxItemMaxPotion" value="100"/>
+
   </appSettings>
-</configuration>
+</configuration>
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/Window/LocationManager.cs b/PokemonGo/RocketAPI/Window/LocationManager.cs
index 065febc..6b6f3b5 100644
--- a/PokemonGo/RocketAPI/Window/LocationManager.cs
+++ b/PokemonGo/RocketAPI/Window/LocationManager.cs
@@ -3,59 +3,34 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using PokemonGo.RocketAPI;
+using PokemonGo.RocketAPI.Extensions;

 namespace PokemonGo.RocketAPI.Window
 {
     public class LocationManager
     {
         private Client client;
-        private double kilometersPerMillisecond;
+        private double metersPerMillisecond;

         public LocationManager(Client client, double speed)
         {
             this.client = client;
-            this.kilometersPerMillisecond = speed / 3600000;
+            this.metersPerMillisecond = speed / 3600;
         }

         public double getDistance(double lat, double lng)
         {
-            Coordinate currentLoc = new Coordinate(client.getCurrentLat(), client.getCurrentLong());
-            return currentLoc.distanceFrom(new Coordinate(lat, lng));
+            LatLong currentLoc = new LatLong(client.CurrentLatitude, client.CurrentLongitude);
+            return currentLoc.distanceFrom(new LatLong(lat, lng));
         }

         public async Task update(double lat, double lng)
         {
-            double waitTime = getDistance(lat, lng)/this.kilometersPerMillisecond;
+            double waitTime = getDistance(lat, lng) / this.metersPerMillisecond;
             await Task.Delay((int)Math.Ceiling(waitTime));
             await client.UpdatePlayerLocation(lat, lng);
         }
-
-        public struct Coordinate
-        {
-
-            public Coordinate(double lat, double lng)
-            {
-                this.latitude = lat;
-                this.longitude = lng;
-            }
-            public double latitude;
-            public double longitude;
-
-            //returns distance in kilometers
-            public double distanceFrom(Coordinate c2)
-            {
-                double R = 6371;
-                Func<double, double> toRad = x => x * (Math.PI / 180);
-                double dLat = toRad(c2.latitude - this.latitude);
-                double dLong = toRad(c2.longitude - c2.longitude);
-                double lat1 = toRad(this.latitude);
-                double lat2 = toRad(c2.latitude);
-                double a = Math.Sin(dLat / 2) * Math.Sin(dLat / 2) +
-                    Math.Sin(dLong / 2) * Math.Sin(dLong / 2) * Math.Cos(lat1) * Math.Cos(lat2);
-                double c = 2 * Math.Atan2(Math.Sqrt(a), Math.Sqrt(1 - a));
-                return R * c;
-            }
-        }
     }

-}
+}
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/Window/MainForm.Designer.cs b/PokemonGo/RocketAPI/Window/MainForm.Designer.cs
index 2c3859c..bf0442f 100644
--- a/PokemonGo/RocketAPI/Window/MainForm.Designer.cs
+++ b/PokemonGo/RocketAPI/Window/MainForm.Designer.cs
@@ -28,108 +28,114 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
             this.logTextBox = new System.Windows.Forms.RichTextBox();
             this.statusStrip1 = new System.Windows.Forms.StatusStrip();
             this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel();
             this.menuStrip1 = new System.Windows.Forms.MenuStrip();
             this.startStopBotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.mapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.todoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.pokemonToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
             this.useLuckyEggToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.forceUnbanToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.showAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.showAllToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
+            this.gMapControl1 = new GMap.NET.WindowsForms.GMapControl();
+            this.objectListView1 = new BrightIdeasSoftware.ObjectListView();
+            this.pkmnName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+            this.pkmnCP = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+            this.pkmnAtkIV = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+            this.pkmnDefIV = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+            this.pkmnStaIV = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+            this.pkmnIV = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+            this.pkmnTransferButton = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+            this.pkmnPowerUpButton = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+            this.pkmnEvolveButton = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+            this.largePokemonImageList = new System.Windows.Forms.ImageList(this.components);
+            this.smallPokemonImageList = new System.Windows.Forms.ImageList(this.components);
+            this.button1 = new System.Windows.Forms.Button();
+            this.tabControl1 = new System.Windows.Forms.TabControl();
+            this.tabPage1 = new System.Windows.Forms.TabPage();
+            this.label1 = new System.Windows.Forms.Label();
+            this.tabPage2 = new System.Windows.Forms.TabPage();
             this.statusStrip1.SuspendLayout();
             this.menuStrip1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.objectListView1)).BeginInit();
+            this.tabControl1.SuspendLayout();
+            this.tabPage1.SuspendLayout();
             this.SuspendLayout();
             //
             // logTextBox
             //
             this.logTextBox.BackColor = System.Drawing.Color.Black;
-            this.logTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.logTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.logTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.logTextBox.ForeColor = System.Drawing.Color.White;
             this.logTextBox.ImeMode = System.Windows.Forms.ImeMode.Off;
             this.logTextBox.Location = new System.Drawing.Point(0, 24);
             this.logTextBox.Name = "logTextBox";
             this.logTextBox.ReadOnly = true;
-            this.logTextBox.Size = new System.Drawing.Size(905, 471);
+            this.logTextBox.Size = new System.Drawing.Size(668, 338);
             this.logTextBox.TabIndex = 0;
             this.logTextBox.Text = "";
             this.logTextBox.TextChanged += new System.EventHandler(this.logTextBox_TextChanged);
             //
             // statusStrip1
             //
+            this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
             this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.statusLabel});
-            this.statusStrip1.Location = new System.Drawing.Point(0, 495);
+            this.statusStrip1.Location = new System.Drawing.Point(0, 615);
             this.statusStrip1.Name = "statusStrip1";
-            this.statusStrip1.Size = new System.Drawing.Size(905, 22);
+            this.statusStrip1.Size = new System.Drawing.Size(1012, 22);
             this.statusStrip1.TabIndex = 1;
             this.statusStrip1.Text = "statusStrip1";
             //
             // statusLabel
             //
             this.statusLabel.Name = "statusLabel";
-            this.statusLabel.Size = new System.Drawing.Size(39, 17);
+            this.statusLabel.Size = new System.Drawing.Size(43, 17);
             this.statusLabel.Text = "Status";
             //
             // menuStrip1
             //
+            this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
             this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.startStopBotToolStripMenuItem,
-            this.mapToolStripMenuItem,
             this.todoToolStripMenuItem,
-            this.pokemonToolStripMenuItem2,
             this.useLuckyEggToolStripMenuItem,
             this.forceUnbanToolStripMenuItem});
             this.menuStrip1.Location = new System.Drawing.Point(0, 0);
             this.menuStrip1.Name = "menuStrip1";
-            this.menuStrip1.Size = new System.Drawing.Size(905, 24);
+            this.menuStrip1.Size = new System.Drawing.Size(1012, 25);
             this.menuStrip1.TabIndex = 2;
             this.menuStrip1.Text = "menuStrip1";
             //
-            // startBotToolStripMenuItem
+            // startStopBotToolStripMenuItem
             //
             this.startStopBotToolStripMenuItem.Name = "startStopBotToolStripMenuItem";
-            this.startStopBotToolStripMenuItem.Size = new System.Drawing.Size(64, 20);
-            this.startStopBotToolStripMenuItem.Text = "Start Bot";
+            this.startStopBotToolStripMenuItem.Size = new System.Drawing.Size(85, 21);
+            this.startStopBotToolStripMenuItem.Text = "▶ Start Bot";
             this.startStopBotToolStripMenuItem.Click += new System.EventHandler(this.startStopBotToolStripMenuItem_Click);
             //
-            // mapToolStripMenuItem
-            //
-            this.mapToolStripMenuItem.Name = "mapToolStripMenuItem";
-            this.mapToolStripMenuItem.Size = new System.Drawing.Size(43, 20);
-            this.mapToolStripMenuItem.Text = "Map";
-            this.mapToolStripMenuItem.Click += new System.EventHandler(this.mapToolStripMenuItem_Click);
-            //
             // todoToolStripMenuItem
             //
             this.todoToolStripMenuItem.Name = "todoToolStripMenuItem";
-            this.todoToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
+            this.todoToolStripMenuItem.Size = new System.Drawing.Size(66, 21);
             this.todoToolStripMenuItem.Text = "Settings";
             this.todoToolStripMenuItem.Click += new System.EventHandler(this.todoToolStripMenuItem_Click);
             //
-            // pokemonToolStripMenuItem2
-            //
-            this.pokemonToolStripMenuItem2.Name = "pokemonToolStripMenuItem2";
-            this.pokemonToolStripMenuItem2.Size = new System.Drawing.Size(70, 20);
-            this.pokemonToolStripMenuItem2.Text = "Pokemon";
-            this.pokemonToolStripMenuItem2.Click += new System.EventHandler(this.pokemonToolStripMenuItem2_Click);
-            //
             // useLuckyEggToolStripMenuItem
             //
             this.useLuckyEggToolStripMenuItem.Name = "useLuckyEggToolStripMenuItem";
-            this.useLuckyEggToolStripMenuItem.Size = new System.Drawing.Size(95, 20);
+            this.useLuckyEggToolStripMenuItem.Size = new System.Drawing.Size(105, 21);
             this.useLuckyEggToolStripMenuItem.Text = "Use Lucky Egg";
             this.useLuckyEggToolStripMenuItem.Click += new System.EventHandler(this.useLuckyEggToolStripMenuItem_Click);
             //
             // forceUnbanToolStripMenuItem
             //
             this.forceUnbanToolStripMenuItem.Name = "forceUnbanToolStripMenuItem";
-            this.forceUnbanToolStripMenuItem.Size = new System.Drawing.Size(86, 20);
+            this.forceUnbanToolStripMenuItem.Size = new System.Drawing.Size(94, 21);
             this.forceUnbanToolStripMenuItem.Text = "Force Unban";
             this.forceUnbanToolStripMenuItem.Click += new System.EventHandler(this.forceUnbanToolStripMenuItem_Click);
             //
@@ -143,24 +149,234 @@
             this.showAllToolStripMenuItem1.Name = "showAllToolStripMenuItem1";
             this.showAllToolStripMenuItem1.Size = new System.Drawing.Size(32, 19);
             //
+            // gMapControl1
+            //
+            this.gMapControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.gMapControl1.Bearing = 0F;
+            this.gMapControl1.CanDragMap = true;
+            this.gMapControl1.EmptyTileColor = System.Drawing.Color.Navy;
+            this.gMapControl1.GrayScaleMode = false;
+            this.gMapControl1.HelperLineOption = GMap.NET.WindowsForms.HelperLineOptions.DontShow;
+            this.gMapControl1.LevelsKeepInMemmory = 5;
+            this.gMapControl1.Location = new System.Drawing.Point(674, 24);
+            this.gMapControl1.MarkersEnabled = true;
+            this.gMapControl1.MaxZoom = 2;
+            this.gMapControl1.MinZoom = 2;
+            this.gMapControl1.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
+            this.gMapControl1.Name = "gMapControl1";
+            this.gMapControl1.NegativeMode = false;
+            this.gMapControl1.PolygonsEnabled = true;
+            this.gMapControl1.RetryLoadTile = 0;
+            this.gMapControl1.RoutesEnabled = true;
+            this.gMapControl1.ScaleMode = GMap.NET.WindowsForms.ScaleModes.Integer;
+            this.gMapControl1.SelectedAreaFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(65)))), ((int)(((byte)(105)))), ((int)(((byte)(225)))));
+            this.gMapControl1.ShowTileGridLines = false;
+            this.gMapControl1.Size = new System.Drawing.Size(338, 338);
+            this.gMapControl1.TabIndex = 23;
+            this.gMapControl1.Zoom = 0D;
+            //
+            // objectListView1
+            //
+            this.objectListView1.AllColumns.Add(this.pkmnName);
+            this.objectListView1.AllColumns.Add(this.pkmnCP);
+            this.objectListView1.AllColumns.Add(this.pkmnAtkIV);
+            this.objectListView1.AllColumns.Add(this.pkmnDefIV);
+            this.objectListView1.AllColumns.Add(this.pkmnStaIV);
+            this.objectListView1.AllColumns.Add(this.pkmnIV);
+            this.objectListView1.AllColumns.Add(this.pkmnTransferButton);
+            this.objectListView1.AllColumns.Add(this.pkmnPowerUpButton);
+            this.objectListView1.AllColumns.Add(this.pkmnEvolveButton);
+            this.objectListView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.objectListView1.CellEditUseWholeCell = false;
+            this.objectListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.pkmnName,
+            this.pkmnCP,
+            this.pkmnAtkIV,
+            this.pkmnDefIV,
+            this.pkmnStaIV,
+            this.pkmnIV,
+            this.pkmnTransferButton,
+            this.pkmnPowerUpButton,
+            this.pkmnEvolveButton});
+            this.objectListView1.Cursor = System.Windows.Forms.Cursors.Default;
+            this.objectListView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.objectListView1.FullRowSelect = true;
+            this.objectListView1.GridLines = true;
+            this.objectListView1.LargeImageList = this.largePokemonImageList;
+            this.objectListView1.Location = new System.Drawing.Point(0, 368);
+            this.objectListView1.MultiSelect = false;
+            this.objectListView1.Name = "objectListView1";
+            this.objectListView1.RowHeight = 32;
+            this.objectListView1.SelectAllOnControlA = false;
+            this.objectListView1.ShowGroups = false;
+            this.objectListView1.Size = new System.Drawing.Size(668, 215);
+            this.objectListView1.SmallImageList = this.smallPokemonImageList;
+            this.objectListView1.TabIndex = 25;
+            this.objectListView1.UseCompatibleStateImageBehavior = false;
+            this.objectListView1.View = System.Windows.Forms.View.Details;
+            this.objectListView1.SelectedIndexChanged += new System.EventHandler(this.objectListView1_SelectedIndexChanged);
+            //
+            // pkmnName
+            //
+            this.pkmnName.AspectName = "PokemonId";
+            this.pkmnName.AspectToStringFormat = "";
+            this.pkmnName.Text = "Name";
+            this.pkmnName.Width = 130;
+            //
+            // pkmnCP
+            //
+            this.pkmnCP.AspectName = "Cp";
+            this.pkmnCP.Text = "CP";
+            //
+            // pkmnAtkIV
+            //
+            this.pkmnAtkIV.AspectName = "IndividualAttack";
+            this.pkmnAtkIV.Text = "Attack IV";
+            this.pkmnAtkIV.Width = 70;
+            //
+            // pkmnDefIV
+            //
+            this.pkmnDefIV.AspectName = "IndividualDefense";
+            this.pkmnDefIV.Text = "Defense IV";
+            this.pkmnDefIV.Width = 70;
+            //
+            // pkmnStaIV
+            //
+            this.pkmnStaIV.AspectName = "IndividualStamina";
+            this.pkmnStaIV.Text = "Stamina IV";
+            this.pkmnStaIV.Width = 70;
+            //
+            // pkmnIV
+            //
+            this.pkmnIV.AspectName = "GetIV";
+            this.pkmnIV.AspectToStringFormat = "{0:P2}";
+            this.pkmnIV.Text = "Perfection";
+            //
+            // pkmnTransferButton
+            //
+            this.pkmnTransferButton.AspectName = "Id";
+            this.pkmnTransferButton.AspectToStringFormat = "Transfer";
+            this.pkmnTransferButton.ButtonSizing = BrightIdeasSoftware.OLVColumn.ButtonSizingMode.CellBounds;
+            this.pkmnTransferButton.IsButton = true;
+            this.pkmnTransferButton.Text = "";
+            //
+            // pkmnPowerUpButton
+            //
+            this.pkmnPowerUpButton.AspectName = "Id";
+            this.pkmnPowerUpButton.AspectToStringFormat = "Power Up";
+            this.pkmnPowerUpButton.ButtonSizing = BrightIdeasSoftware.OLVColumn.ButtonSizingMode.CellBounds;
+            this.pkmnPowerUpButton.IsButton = true;
+            this.pkmnPowerUpButton.Text = "";
+            //
+            // pkmnEvolveButton
+            //
+            this.pkmnEvolveButton.AspectName = "Id";
+            this.pkmnEvolveButton.AspectToStringFormat = "Evolve";
+            this.pkmnEvolveButton.IsButton = true;
+            this.pkmnEvolveButton.Text = "";
+            //
+            // largePokemonImageList
+            //
+            this.largePokemonImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+            this.largePokemonImageList.ImageSize = new System.Drawing.Size(96, 96);
+            this.largePokemonImageList.TransparentColor = System.Drawing.Color.Transparent;
+            //
+            // smallPokemonImageList
+            //
+            this.smallPokemonImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+            this.smallPokemonImageList.ImageSize = new System.Drawing.Size(32, 32);
+            this.smallPokemonImageList.TransparentColor = System.Drawing.Color.Transparent;
+            //
+            // button1
+            //
+            this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+            this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.button1.Location = new System.Drawing.Point(0, 588);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(668, 26);
+            this.button1.TabIndex = 26;
+            this.button1.Text = "Refresh";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            //
+            // tabControl1
+            //
+            this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom;
+            this.tabControl1.Controls.Add(this.tabPage1);
+            this.tabControl1.Controls.Add(this.tabPage2);
+            this.tabControl1.Enabled = false;
+            this.tabControl1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.tabControl1.Location = new System.Drawing.Point(674, 368);
+            this.tabControl1.Name = "tabControl1";
+            this.tabControl1.RightToLeft = System.Windows.Forms.RightToLeft.No;
+            this.tabControl1.SelectedIndex = 0;
+            this.tabControl1.Size = new System.Drawing.Size(338, 244);
+            this.tabControl1.TabIndex = 27;
+            //
+            // tabPage1
+            //
+            this.tabPage1.Controls.Add(this.label1);
+            this.tabPage1.Location = new System.Drawing.Point(4, 4);
+            this.tabPage1.Name = "tabPage1";
+            this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
+            this.tabPage1.Size = new System.Drawing.Size(330, 216);
+            this.tabPage1.TabIndex = 0;
+            this.tabPage1.Text = "Incoming Feature";
+            this.tabPage1.UseVisualStyleBackColor = true;
+            //
+            // label1
+            //
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.label1.Location = new System.Drawing.Point(67, 102);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(189, 25);
+            this.label1.TabIndex = 0;
+            this.label1.Text = "Incoming Features";
+            //
+            // tabPage2
+            //
+            this.tabPage2.Location = new System.Drawing.Point(4, 4);
+            this.tabPage2.Name = "tabPage2";
+            this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
+            this.tabPage2.Size = new System.Drawing.Size(330, 216);
+            this.tabPage2.TabIndex = 1;
+            this.tabPage2.Text = ":3";
+            this.tabPage2.UseVisualStyleBackColor = true;
+            //
             // MainForm
             //
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(905, 517);
+            this.ClientSize = new System.Drawing.Size(1012, 637);
+            this.Controls.Add(this.gMapControl1);
             this.Controls.Add(this.logTextBox);
+            this.Controls.Add(this.button1);
+            this.Controls.Add(this.objectListView1);
             this.Controls.Add(this.statusStrip1);
             this.Controls.Add(this.menuStrip1);
+            this.Controls.Add(this.tabControl1);
             this.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
             this.MainMenuStrip = this.menuStrip1;
+            this.MaximizeBox = false;
             this.Name = "MainForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "PokemonGo Rocket API";
             this.Load += new System.EventHandler(this.MainForm_Load);
             this.statusStrip1.ResumeLayout(false);
             this.statusStrip1.PerformLayout();
             this.menuStrip1.ResumeLayout(false);
             this.menuStrip1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.objectListView1)).EndInit();
+            this.tabControl1.ResumeLayout(false);
+            this.tabPage1.ResumeLayout(false);
+            this.tabPage1.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();

@@ -176,9 +392,25 @@
         private System.Windows.Forms.ToolStripMenuItem startStopBotToolStripMenuItem;
         private System.Windows.Forms.ToolStripMenuItem showAllToolStripMenuItem;
         private System.Windows.Forms.ToolStripMenuItem showAllToolStripMenuItem1;
-        private System.Windows.Forms.ToolStripMenuItem pokemonToolStripMenuItem2;
         private System.Windows.Forms.ToolStripMenuItem useLuckyEggToolStripMenuItem;
         private System.Windows.Forms.ToolStripMenuItem forceUnbanToolStripMenuItem;
-        private System.Windows.Forms.ToolStripMenuItem mapToolStripMenuItem;
+        private GMap.NET.WindowsForms.GMapControl gMapControl1;
+        private BrightIdeasSoftware.ObjectListView objectListView1;
+        private BrightIdeasSoftware.OLVColumn pkmnName;
+        private BrightIdeasSoftware.OLVColumn pkmnCP;
+        private BrightIdeasSoftware.OLVColumn pkmnAtkIV;
+        private BrightIdeasSoftware.OLVColumn pkmnDefIV;
+        private BrightIdeasSoftware.OLVColumn pkmnStaIV;
+        private BrightIdeasSoftware.OLVColumn pkmnIV;
+        private BrightIdeasSoftware.OLVColumn pkmnTransferButton;
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.ImageList smallPokemonImageList;
+        private System.Windows.Forms.ImageList largePokemonImageList;
+        private BrightIdeasSoftware.OLVColumn pkmnPowerUpButton;
+        private BrightIdeasSoftware.OLVColumn pkmnEvolveButton;
+        private System.Windows.Forms.TabControl tabControl1;
+        private System.Windows.Forms.TabPage tabPage1;
+        private System.Windows.Forms.TabPage tabPage2;
+        private System.Windows.Forms.Label label1;
     }
 }
diff --git a/PokemonGo/RocketAPI/Window/MainForm.cs b/PokemonGo/RocketAPI/Window/MainForm.cs
index 67fd3eb..a38292f 100644
--- a/PokemonGo/RocketAPI/Window/MainForm.cs
+++ b/PokemonGo/RocketAPI/Window/MainForm.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
@@ -18,20 +18,77 @@ using PokemonGo.RocketAPI.Enums;
 using PokemonGo.RocketAPI.Exceptions;
 using PokemonGo.RocketAPI.Extensions;
 using PokemonGo.RocketAPI.GeneratedCode;
+using System.Configuration;
+using GMap.NET;
+using GMap.NET.MapProviders;
+using GMap.NET.WindowsForms;
+using GMap.NET.WindowsForms.Markers;
+using GMap.NET.WindowsForms.ToolTips;
+using System.Threading;
+using BrightIdeasSoftware;
+using PokemonGo.RocketAPI.Helpers;

 namespace PokemonGo.RocketAPI.Window
 {
     public partial class MainForm : Form
     {
+        public static MainForm Instance;
+        public static SynchronizationContext synchronizationContext;
+
+        GMapOverlay searchAreaOverlay = new GMapOverlay("areas");
+        GMapOverlay pokestopsOverlay = new GMapOverlay("pokestops");
+        GMapOverlay pokemonsOverlay = new GMapOverlay("pokemons");
+        GMapOverlay playerOverlay = new GMapOverlay("players");
+
+        GMarkerGoogle playerMarker;
+
+        IEnumerable<FortData> pokeStops;
+        IEnumerable<WildPokemon> wildPokemons;
+
         public MainForm()
         {
+            synchronizationContext = SynchronizationContext.Current;
             InitializeComponent();
             ClientSettings = Settings.Instance;
         }

         private void MainForm_Load(object sender, EventArgs e)
         {
+            gMapControl1.MapProvider = GoogleMapProvider.Instance;
+            gMapControl1.Manager.Mode = AccessMode.ServerOnly;
+            GMapProvider.WebProxy = null;
+            gMapControl1.Position = new PointLatLng(ClientSettings.DefaultLatitude, ClientSettings.DefaultLongitude);
+            gMapControl1.DragButton = MouseButtons.Left;
+
+            gMapControl1.MinZoom = 1;
+            gMapControl1.MaxZoom = 20;
+            gMapControl1.Zoom = 15;
+
+            gMapControl1.Overlays.Add(searchAreaOverlay);
+            gMapControl1.Overlays.Add(pokestopsOverlay);
+            gMapControl1.Overlays.Add(pokemonsOverlay);
+            gMapControl1.Overlays.Add(playerOverlay);
+
+            playerMarker = new GMarkerGoogle(new PointLatLng(ClientSettings.DefaultLatitude, ClientSettings.DefaultLongitude),
+                GMarkerGoogleType.orange_small);
+            playerOverlay.Markers.Add(playerMarker);
+
+            InitializeMap();
+            InitializePokemonForm();
+        }

+        public void Restart()
+        {
+            InitializeMap();
+            InitializePokemonForm();
+        }
+
+        private void InitializeMap()
+        {
+            playerMarker.Position = new PointLatLng(ClientSettings.DefaultLatitude, ClientSettings.DefaultLongitude);
+
+            searchAreaOverlay.Polygons.Clear();
+            S2GMapDrawer.DrawS2Cells(S2Helper.GetNearbyCellIds(ClientSettings.DefaultLongitude, ClientSettings.DefaultLatitude), searchAreaOverlay);
         }

         public static ISettings ClientSettings;
@@ -45,9 +102,10 @@ namespace PokemonGo.RocketAPI.Window
         private static DateTime TimeStarted = DateTime.Now;
         public static DateTime InitSessionDateTime = DateTime.Now;

-
         Client client;
+        Client client2;
         LocationManager locationManager;
+
         public static double GetRuntime()
         {
             return ((DateTime.Now - TimeStarted).TotalSeconds) / 3600;
@@ -74,7 +132,7 @@ namespace PokemonGo.RocketAPI.Window
                 // makes sense to display your version and say what the current one is on github
                 ColoredConsoleWrite(Color.Green, "Your version is " + Assembly.GetExecutingAssembly().GetName().Version);
                 ColoredConsoleWrite(Color.Green, "Github version is " + gitVersion);
-                ColoredConsoleWrite(Color.Green, "You can find it at www.GitHub.com/DetectiveSquirrel/Pokemon-Go-Rocket-API");
+                ColoredConsoleWrite(Color.Green, "You can find it at www.GitHub.com/1461748123/Pokemon-Go-Rocket-API");
             }
             catch (Exception)
             {
@@ -87,7 +145,7 @@ namespace PokemonGo.RocketAPI.Window
             using (var wC = new WebClient())
                 return
                     wC.DownloadString(
-                        "https://raw.githubusercontent.com/DetectiveSquirrel/Pokemon-Go-Rocket-API/master/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs");
+                        "https://raw.githubusercontent.com/1461748123/Pokemon-Go-Rocket-API/master/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs");
         }

         public void ColoredConsoleWrite(Color color, string text)
@@ -107,7 +165,10 @@ namespace PokemonGo.RocketAPI.Window
             object syncRoot = new object();
             lock (syncRoot) // Added locking to prevent text file trying to be accessed by two things at the same time
             {
-                File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory + @"\Logs.txt", "[" + DateTime.Now.ToString("HH:mm:ss tt") + "] " + text + "\n");
+                var dir = AppDomain.CurrentDomain.BaseDirectory + @"\Logs";
+                if (!Directory.Exists(dir))
+                    Directory.CreateDirectory(dir);
+                File.AppendAllText(dir + @"\" + DateTime.Today.ToString("yyyyMMdd") + ".txt", "[" + DateTime.Now.ToString("HH:mm:ss tt") + "] " + text + "\r\n");
             }
         }

@@ -204,15 +265,13 @@ namespace PokemonGo.RocketAPI.Window
                 {
                     case AuthType.Ptc:
                         ColoredConsoleWrite(Color.Green, "Login Type: Pokemon Trainers Club");
-                        await client.DoPtcLogin(ClientSettings.PtcUsername, ClientSettings.PtcPassword);
                         break;
                     case AuthType.Google:
                         ColoredConsoleWrite(Color.Green, "Login Type: Google");
-                        await client.DoGoogleLogin(ClientSettings.Email, ClientSettings.Password);
-
                         break;
                 }

+                await client.Login();
                 await client.SetServer();
                 var profile = await client.GetProfile();
                 var settings = await client.GetSettings();
@@ -222,7 +281,7 @@ namespace PokemonGo.RocketAPI.Window
                     inventory.InventoryDelta.InventoryItems.Select(i => i.InventoryItemData?.Pokemon)
                         .Where(p => p != null && p?.PokemonId > 0);

-                ConsoleLevelTitle(profile.Profile.Username, client);
+                updateUserStatusBar(client);

                 // Write the players ingame details
                 ColoredConsoleWrite(Color.Yellow, "----------------------------");
@@ -237,6 +296,8 @@ namespace PokemonGo.RocketAPI.Window
                     ColoredConsoleWrite(Color.Cyan, "Email: " + ClientSettings.Email);
                     ColoredConsoleWrite(Color.Cyan, "Password: " + ClientSettings.Password + "\n");
                 }*/
+                string lat2 = System.Convert.ToString(ClientSettings.DefaultLatitude);
+                string longit2 = System.Convert.ToString(ClientSettings.DefaultLongitude);
                 ColoredConsoleWrite(Color.DarkGray, "Name: " + profile.Profile.Username);
                 ColoredConsoleWrite(Color.DarkGray, "Team: " + profile.Profile.Team);
                 if (profile.Profile.Currency.ToArray()[0].Amount > 0) // If player has any pokecoins it will show how many they have.
@@ -246,14 +307,15 @@ namespace PokemonGo.RocketAPI.Window
                 ColoredConsoleWrite(Color.DarkGray, "Longitude: " + ClientSettings.DefaultLongitude);
                 try
                 {
-                    ColoredConsoleWrite(Color.DarkGray, "Country: " + CallAPI("country", ClientSettings.DefaultLatitude, ClientSettings.DefaultLongitude));
-                    ColoredConsoleWrite(Color.DarkGray, "Area: " + CallAPI("place", ClientSettings.DefaultLatitude, ClientSettings.DefaultLongitude));
+                    ColoredConsoleWrite(Color.DarkGray, "Country: " + CallAPI("country", lat2.Replace(',', '.'), longit2.Replace(',', '.')));
+                    ColoredConsoleWrite(Color.DarkGray, "Area: " + CallAPI("place", lat2.Replace(',', '.'), longit2.Replace(',', '.')));
                 }
                 catch (Exception)
                 {
                     ColoredConsoleWrite(Color.DarkGray, "Unable to get Country/Place");
                 }

+
                 ColoredConsoleWrite(Color.Yellow, "----------------------------");

                 // I believe a switch is more efficient and easier to read.
@@ -300,28 +362,33 @@ namespace PokemonGo.RocketAPI.Window
                 {
                     ColoredConsoleWrite(Color.Red, $"No nearby useful locations found. Please wait 10 seconds.");
                     await Task.Delay(10000);
-                    CheckVersion();
                     Execute();
-                } else
+                }
+                else
                 {
                     ConsoleClear();
+                    pokestopsOverlay.Routes.Clear();
+                    pokestopsOverlay.Markers.Clear();
                     ColoredConsoleWrite(Color.Red, $"Bot successfully stopped.");
                     startStopBotToolStripMenuItem.Text = "Start";
                     Stopping = false;
                     bot_started = false;
                 }
             }
-            catch (TaskCanceledException) { ColoredConsoleWrite(Color.Red, "Task Canceled Exception - Restarting"); if (!Stopping) Execute();}
+            catch (TaskCanceledException) { ColoredConsoleWrite(Color.Red, "Task Canceled Exception - Restarting"); if (!Stopping) Execute(); }
             catch (UriFormatException) { ColoredConsoleWrite(Color.Red, "System URI Format Exception - Restarting"); if (!Stopping) Execute(); }
             catch (ArgumentOutOfRangeException) { ColoredConsoleWrite(Color.Red, "ArgumentOutOfRangeException - Restarting"); if (!Stopping) Execute(); }
             catch (ArgumentNullException) { ColoredConsoleWrite(Color.Red, "Argument Null Refference - Restarting"); if (!Stopping) Execute(); }
             catch (NullReferenceException) { ColoredConsoleWrite(Color.Red, "Null Refference - Restarting"); if (!Stopping) Execute(); }
             catch (Exception ex) { ColoredConsoleWrite(Color.Red, ex.ToString()); if (!Stopping) Execute(); }
+            finally { client = null; }
+
         }

-        private static string CallAPI(string elem, double lat, double lon)
+        private static string CallAPI(string elem, string lat, string lon)
         {
-            using (XmlReader reader = XmlReader.Create(@"http://api.geonames.org/findNearby?lat=" + lat + "&lng=" + lon + "&username=demo"))
+
+            using (XmlReader reader = XmlReader.Create(@"http://api.geonames.org/findNearby?lat=" + lat + "&lng=" + lon + "&username=pokemongobot"))
             {
                 while (reader.Read())
                 {
@@ -337,7 +404,7 @@ namespace PokemonGo.RocketAPI.Window
                                 break;

                             case "place":
-                                if (reader.Name == "toponymName")
+                                if (reader.Name == "name")
                                 {
                                     return reader.ReadString();
                                 }
@@ -351,6 +418,7 @@ namespace PokemonGo.RocketAPI.Window
             }
             return "Error";
         }
+
         private async Task ExecuteCatchAllNearbyPokemons(Client client)
         {
             var mapObjects = await client.GetMapObjects();
@@ -370,10 +438,26 @@ namespace PokemonGo.RocketAPI.Window
                 FarmingPokemons = true;

                 await locationManager.update(pokemon.Latitude, pokemon.Longitude);
+
+                string pokemonName;
+                if (ClientSettings.Language == "german")
+                {
+                    string name_english = Convert.ToString(pokemon.PokemonId);
+                    var request = (HttpWebRequest)WebRequest.Create("http://boosting-service.de/pokemon/index.php?pokeName=" + name_english);
+                    var response = (HttpWebResponse)request.GetResponse();
+                    pokemonName = new StreamReader(response.GetResponseStream()).ReadToEnd();
+                }
+                else
+                    pokemonName = Convert.ToString(pokemon.PokemonId);
+
+                await client.UpdatePlayerLocation(pokemon.Latitude, pokemon.Longitude);
+                UpdatePlayerLocation(pokemon.Latitude, pokemon.Longitude);
+                UpdateMap();
                 var encounterPokemonResponse = await client.EncounterPokemon(pokemon.EncounterId, pokemon.SpawnpointId);
                 var pokemonCP = encounterPokemonResponse?.WildPokemon?.PokemonData?.Cp;
                 var pokemonIV = Math.Round(Perfect(encounterPokemonResponse?.WildPokemon?.PokemonData));
                 CatchPokemonResponse caughtPokemonResponse;
+                ColoredConsoleWrite(Color.Green, $"Encounter a {pokemonName} with {pokemonCP} CP and {pokemonIV}% IV");
                 do
                 {
                     if (ClientSettings.RazzBerryMode == "cp")
@@ -385,20 +469,14 @@ namespace PokemonGo.RocketAPI.Window
                     caughtPokemonResponse = await client.CatchPokemon(pokemon.EncounterId, pokemon.SpawnpointId, pokemon.Latitude, pokemon.Longitude, MiscEnums.Item.ITEM_POKE_BALL, pokemonCP); ; //note: reverted from settings because this should not be part of settings but part of logic
                 } while (caughtPokemonResponse.Status == CatchPokemonResponse.Types.CatchStatus.CatchMissed || caughtPokemonResponse.Status == CatchPokemonResponse.Types.CatchStatus.CatchEscape);

-                string pokemonName;
-                if (ClientSettings.Language == "german")
-                {
-                    string name_english = Convert.ToString(pokemon.PokemonId);
-                    var request = (HttpWebRequest)WebRequest.Create("http://boosting-service.de/pokemon/index.php?pokeName=" + name_english);
-                    var response = (HttpWebResponse)request.GetResponse();
-                    pokemonName = new StreamReader(response.GetResponseStream()).ReadToEnd();
-                }
-                else
-                    pokemonName = Convert.ToString(pokemon.PokemonId);
-
                 if (caughtPokemonResponse.Status == CatchPokemonResponse.Types.CatchStatus.CatchSuccess)
                 {
-                    ColoredConsoleWrite(Color.Green, $"We caught a {pokemonName} with {pokemonCP} CP and {pokemonIV}% IV");
+                    Color c = Color.LimeGreen;
+                    if (pokemonIV >= 80)
+                    {
+                        c = Color.Yellow;
+                    }
+                    ColoredConsoleWrite(c, $"We caught a {pokemonName} with {pokemonCP} CP and {pokemonIV}% IV");
                     foreach (int xp in caughtPokemonResponse.Scores.Xp)
                         TotalExperience += xp;
                     TotalPokemon += 1;
@@ -436,31 +514,89 @@ namespace PokemonGo.RocketAPI.Window
                 FarmingPokemons = false;
                 await Task.Delay(3000);
             }
+            pokemons = null;
         }

-        private async Task ExecuteFarmingPokestopsAndPokemons(Client client, IEnumerable<FortData> pokeStops = null)
+        private void UpdatePlayerLocation(double latitude, double longitude)
         {
-            var mapObjects = await client.GetMapObjects();
-            if (pokeStops == null)
+            synchronizationContext.Post(new SendOrPostCallback(o =>
             {
-                pokeStops = mapObjects.MapCells.SelectMany(i => i.Forts).Where(i => i.Type == FortType.Checkpoint && i.CooldownCompleteTimestampMs < DateTime.UtcNow.ToUnixTime());
-            }
-            HashSet<FortData> pokeStopSet = new HashSet<FortData>(pokeStops);
-            IEnumerable<FortData> nextPokeStopList = null;
+                playerMarker.Position = (PointLatLng)o;
+
+                searchAreaOverlay.Polygons.Clear();
+
+            }), new PointLatLng(latitude, longitude));
+
+            ColoredConsoleWrite(Color.Gray, $"Moving player location to Lat: {latitude}, Lng: {longitude}");
+        }
+
+        private void UpdateMap()
+        {
+            synchronizationContext.Post(new SendOrPostCallback(o =>
+            {
+                pokestopsOverlay.Markers.Clear();
+                List<PointLatLng> routePoint = new List<PointLatLng>();
+                foreach (var pokeStop in pokeStops)
+                {
+                    GMarkerGoogleType type = GMarkerGoogleType.blue_small;
+                    if (pokeStop.CooldownCompleteTimestampMs > DateTime.UtcNow.ToUnixTime())
+                    {
+                        type = GMarkerGoogleType.gray_small;
+                    }
+                    var pokeStopLoc = new PointLatLng(pokeStop.Latitude, pokeStop.Longitude);
+                    var pokestopMarker = new GMarkerGoogle(pokeStopLoc, type);
+                    //pokestopMarker.ToolTipMode = MarkerTooltipMode.OnMouseOver;
+                    //pokestopMarker.ToolTip = new GMapBaloonToolTip(pokestopMarker);
+                    pokestopsOverlay.Markers.Add(pokestopMarker);
+
+                    routePoint.Add(pokeStopLoc);
+                }
+                pokestopsOverlay.Routes.Clear();
+                pokestopsOverlay.Routes.Add(new GMapRoute(routePoint, "Walking Path"));
+
+
+                pokemonsOverlay.Markers.Clear();
+                if (wildPokemons != null)
+                {
+                    foreach (var pokemon in wildPokemons)
+                    {
+                        var pokemonMarker = new GMarkerGoogle(new PointLatLng(pokemon.Latitude, pokemon.Longitude),
+                            GMarkerGoogleType.red_small);
+                        pokemonsOverlay.Markers.Add(pokemonMarker);
+                    }
+                }
+
+                S2GMapDrawer.DrawS2Cells(S2Helper.GetNearbyCellIds(ClientSettings.DefaultLongitude, ClientSettings.DefaultLatitude), searchAreaOverlay);
+            }), null);
+        }
+
+        private async Task ExecuteFarmingPokestopsAndPokemons(Client client)
+        {
+            var mapObjects = await client.GetMapObjects();
+
+            FortData[] rawPokeStops = mapObjects.MapCells.SelectMany(i => i.Forts).Where(i => i.Type == FortType.Checkpoint && i.CooldownCompleteTimestampMs < DateTime.UtcNow.ToUnixTime()).ToArray();
+            pokeStops = rawPokeStops;
+            UpdateMap();
+            ColoredConsoleWrite(Color.Cyan, $"Finding fastest route through all PokeStops..");
+            LatLong startingLatLong = new LatLong(ClientSettings.DefaultLatitude, ClientSettings.DefaultLongitude);
+            pokeStops = RouteOptimizer.Optimize(rawPokeStops, startingLatLong, pokestopsOverlay);
+            wildPokemons = mapObjects.MapCells.SelectMany(i => i.WildPokemons);
             if (!ForceUnbanning && !Stopping)
                 ColoredConsoleWrite(Color.Cyan, $"Visiting {pokeStops.Count()} PokeStops");
+
+            UpdateMap();
             foreach (var pokeStop in pokeStops)
             {
                 if (ForceUnbanning || Stopping)
                     break;

                 FarmingStops = true;
-
-                double pokeStopDistance = locationManager.getDistance(pokeStop.Latitude, pokeStop.Longitude);
                 await locationManager.update(pokeStop.Latitude, pokeStop.Longitude);
+                UpdatePlayerLocation(pokeStop.Latitude, pokeStop.Longitude);
+                UpdateMap();
+
                 var fortInfo = await client.GetFort(pokeStop.Id, pokeStop.Latitude, pokeStop.Longitude);
                 var fortSearch = await client.SearchFort(pokeStop.Id, pokeStop.Latitude, pokeStop.Longitude);
-
                 StringWriter PokeStopOutput = new StringWriter();
                 PokeStopOutput.Write($"");
                 if (fortInfo.Name != string.Empty)
@@ -478,31 +614,16 @@ namespace PokemonGo.RocketAPI.Window
                 if (fortSearch.ExperienceAwarded != 0)
                     TotalExperience += (fortSearch.ExperienceAwarded);

-                var pokeStopMapObjects = await client.GetMapObjects();
-
-                /* Gets all pokeStops near this pokeStop which are not in the set of pokeStops being currently
-                 * traversed and which are ready to be farmed again.  */
-                var pokeStopsNearPokeStop = pokeStopMapObjects.MapCells.SelectMany(i => i.Forts).Where(i =>
-                    i.Type == FortType.Checkpoint
-                    && i.CooldownCompleteTimestampMs < DateTime.UtcNow.ToUnixTime()
-                    && !pokeStopSet.Contains(i)
-                    );
-
-                /* We choose the longest list of farmable PokeStops to traverse next, though we could use a different
-                 * criterion, such as the number of PokeStops with lures in the list.*/
-                if (pokeStopsNearPokeStop.Count() > (nextPokeStopList == null ? 0 : nextPokeStopList.Count()))
-                {
-                    nextPokeStopList = pokeStopsNearPokeStop;
-                }
+                pokeStop.CooldownCompleteTimestampMs = DateTime.UtcNow.ToUnixTime() + 300000;

                 if (ClientSettings.CatchPokemon)
                     await ExecuteCatchAllNearbyPokemons(client);
             }
             FarmingStops = false;
-            if (nextPokeStopList != null)
+            if (!ForceUnbanning && !Stopping)
             {
                 client.RecycleItems(client);
-                await ExecuteFarmingPokestopsAndPokemons(client, nextPokeStopList);
+                await ExecuteFarmingPokestopsAndPokemons(client);
             }
         }

@@ -520,44 +641,43 @@ namespace PokemonGo.RocketAPI.Window

                 ColoredConsoleWrite(Color.LightGreen, "Starting force unban...");

-                var mapObjects = await client.GetMapObjects();
-                var pokeStops = mapObjects.MapCells.SelectMany(i => i.Forts).Where(i => i.Type == FortType.Checkpoint && i.CooldownCompleteTimestampMs < DateTime.UtcNow.ToUnixTime());
-
-                await Task.Delay(10000);
+                pokestopsOverlay.Routes.Clear();
+                pokestopsOverlay.Markers.Clear();
                 bool done = false;
-
                 foreach (var pokeStop in pokeStops)
                 {
-
-                    double pokeStopDistance = locationManager.getDistance(pokeStop.Latitude, pokeStop.Longitude);
-                    await locationManager.update(pokeStop.Latitude, pokeStop.Longitude);
-                    var fortInfo = await client.GetFort(pokeStop.Id, pokeStop.Latitude, pokeStop.Longitude);
-
-                    if (fortInfo.Name != string.Empty)
+                    if (pokeStop.CooldownCompleteTimestampMs < DateTime.UtcNow.ToUnixTime())
                     {
-                        ColoredConsoleWrite(Color.LightGreen, "Chosen PokeStop " + fortInfo.Name + " for force unban");
-                        for (int i = 1; i <= 50; i++)
+                        await locationManager.update(pokeStop.Latitude, pokeStop.Longitude);
+                        UpdatePlayerLocation(pokeStop.Latitude, pokeStop.Longitude);
+                        UpdateMap();
+
+                        var fortInfo = await client.GetFort(pokeStop.Id, pokeStop.Latitude, pokeStop.Longitude);
+                        if (fortInfo.Name != string.Empty)
                         {
-                            var fortSearch = await client.SearchFort(pokeStop.Id, pokeStop.Latitude, pokeStop.Longitude);
-                            if (fortSearch.ExperienceAwarded == 0)
+                            ColoredConsoleWrite(Color.LightGreen, "Chosen PokeStop " + fortInfo.Name + " for force unban");
+                            for (int i = 1; i <= 50; i++)
                             {
-                                ColoredConsoleWrite(Color.LightGreen, "Attempt: " + i);
+                                var fortSearch = await client.SearchFort(pokeStop.Id, pokeStop.Latitude, pokeStop.Longitude);
+                                if (fortSearch.ExperienceAwarded == 0)
+                                {
+                                    ColoredConsoleWrite(Color.LightGreen, "Attempt: " + i);
+                                }
+                                else
+                                {
+                                    ColoredConsoleWrite(Color.LightGreen, "Fuck yes, you are now unbanned! Total attempts: " + i);
+                                    done = true;
+                                    break;
+                                }
                             }
-                            else
-                            {
-                                ColoredConsoleWrite(Color.LightGreen, "Fuck yes, you are now unbanned! Total attempts: " + i);
-                                done = true;
+                            if (done)
                                 break;
-                            }
                         }
                     }
-
-                    if (!done)
-                        ColoredConsoleWrite(Color.LightGreen, "Force unban failed, please try again.");
-
-                    ForceUnbanning = false;
-                    break;
                 }
+                if (!done)
+                    ColoredConsoleWrite(Color.LightGreen, "Force unban failed, please try again.");
+                ForceUnbanning = false;
             }
             else
             {
@@ -583,38 +703,11 @@ namespace PokemonGo.RocketAPI.Window

         private async Task TransferAllButStrongestUnwantedPokemon(Client client)
         {
-            //ColoredConsoleWrite(ConsoleColor.White, $"Firing up the meat grinder");
-
-            var unwantedPokemonTypes = new[]
+            var unwantedPokemonTypes = new List<PokemonId>();
+            for (int i = 1; i <= 151; i++)
             {
-                PokemonId.Pidgey,
-                PokemonId.Rattata,
-                PokemonId.Weedle,
-                PokemonId.Zubat,
-                PokemonId.Caterpie,
-                PokemonId.Pidgeotto,
-                PokemonId.NidoranFemale,
-                PokemonId.Paras,
-                PokemonId.Venonat,
-                PokemonId.Psyduck,
-                PokemonId.Poliwag,
-                PokemonId.Slowpoke,
-                PokemonId.Drowzee,
-                PokemonId.Gastly,
-                PokemonId.Goldeen,
-                PokemonId.Staryu,
-                PokemonId.Magikarp,
-                PokemonId.Clefairy,
-                PokemonId.Eevee,
-                PokemonId.Tentacool,
-                PokemonId.Dratini,
-                PokemonId.Ekans,
-                PokemonId.Jynx,
-                PokemonId.Lickitung,
-                PokemonId.Spearow,
-                PokemonId.NidoranFemale,
-                PokemonId.NidoranMale
-            };
+                unwantedPokemonTypes.Add((PokemonId)i);
+            }

             var inventory = await client.GetInventory();
             var pokemons = inventory.InventoryDelta.InventoryItems
@@ -632,11 +725,8 @@ namespace PokemonGo.RocketAPI.Window
                     pokemonOfDesiredType.Skip(1) // keep the strongest one for potential battle-evolving
                         .ToList();

-                //ColoredConsoleWrite(ConsoleColor.White, $"Grinding {unwantedPokemon.Count} pokemons of type {unwantedPokemonType}");
                 await TransferAllGivenPokemons(client, unwantedPokemon);
             }
-
-            //ColoredConsoleWrite(ConsoleColor.White, $"Finished grinding all the meat");
         }

         public static float Perfect(PokemonData poke)
@@ -822,6 +912,8 @@ namespace PokemonGo.RocketAPI.Window
             ColoredConsoleWrite(Color.Gray, $"Finished grinding all the meat");
         }

+
+
         public async Task PrintLevel(Client client)
         {
             var inventory = await client.GetInventory();
@@ -852,19 +944,41 @@ namespace PokemonGo.RocketAPI.Window
             return (DateTime.Now - InitSessionDateTime).ToString(@"dd\.hh\:mm\:ss");
         }

-        public async Task ConsoleLevelTitle(string Username, Client client)
+        public async Task updateUserStatusBar(Client client)
         {
             var inventory = await client.GetInventory();
             var stats = inventory.InventoryDelta.InventoryItems.Select(i => i.InventoryItemData?.PlayerStats).ToArray();
             var profile = await client.GetProfile();
+            Int16 hoursLeft = 0; Int16 minutesLeft = 0; Int32 secondsLeft = 0; double xpSec = 0;
             foreach (var v in stats)
                 if (v != null)
                 {
                     int XpDiff = GetXpDiff(client, v.Level);
-                    SetStatusText(string.Format(Username + " | Level: {0:0} - ({2:0} / {3:0}) | Runtime {1} | Stardust: {4:0}", v.Level, _getSessionRuntimeInTimeFormat(), (v.Experience - v.PrevLevelXp - XpDiff), (v.NextLevelXp - v.PrevLevelXp - XpDiff), profile.Profile.Currency.ToArray()[1].Amount) + " | XP/Hour: " + Math.Round(TotalExperience / GetRuntime()) + " | Pokemon/Hour: " + Math.Round(TotalPokemon / GetRuntime()));
+                    //Calculating the exp needed to level up
+                    Single expNextLvl = (v.NextLevelXp - v.Experience);
+                    //Calculating the exp made per second
+                    xpSec = (Math.Round(TotalExperience / GetRuntime()) / 60) / 60;
+                    //Calculating the seconds left to level up
+                    if (xpSec != 0)
+                        secondsLeft = Convert.ToInt32((expNextLvl / xpSec));
+                    //formatting data to make an output like DateFormat
+                    while (secondsLeft > 60)
+                    {
+                        secondsLeft -= 60;
+                        if (minutesLeft < 60)
+                        {
+                            minutesLeft++;
+                        }
+                        else
+                        {
+                            minutesLeft = 0;
+                            hoursLeft++;
+                        }
+                    }
+                    SetStatusText(string.Format(profile.Profile.Username + " | Level: {0:0} - ({2:0} / {3:0}) | Runtime {1} | Stardust: {4:0}", v.Level, _getSessionRuntimeInTimeFormat(), (v.Experience - v.PrevLevelXp - XpDiff), (v.NextLevelXp - v.PrevLevelXp - XpDiff), profile.Profile.Currency.ToArray()[1].Amount) + " | XP/Hour: " + Math.Round(TotalExperience / GetRuntime()) + " | Pokemon/Hour: " + Math.Round(TotalPokemon / GetRuntime()) + " | NextLevel in: " + hoursLeft + ":" + minutesLeft + ":" + secondsLeft);
                 }
             await Task.Delay(1000);
-            ConsoleLevelTitle(Username, client);
+            updateUserStatusBar(client);
         }

         public static int GetXpDiff(Client client, int Level)
@@ -955,6 +1069,15 @@ namespace PokemonGo.RocketAPI.Window
             return 0;
         }

+        public void confirmBotStopped()
+        {
+            //ConsoleClear(); // dont really want the console to be wipped on bot stop, unnecessary
+            ColoredConsoleWrite(Color.Red, $"Bot successfully stopped.");
+            startStopBotToolStripMenuItem.Text = "▶ Start Bot";
+            Stopping = false;
+            bot_started = false;
+        }
+
         private void logTextBox_TextChanged(object sender, EventArgs e)
         {
             logTextBox.SelectionStart = logTextBox.Text.Length;
@@ -964,7 +1087,7 @@ namespace PokemonGo.RocketAPI.Window
         private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
         {
             SettingsForm settingsForm = new SettingsForm();
-            settingsForm.Show();
+            settingsForm.ShowDialog();
         }

         private static bool bot_started = false;
@@ -973,7 +1096,7 @@ namespace PokemonGo.RocketAPI.Window
             if (!bot_started)
             {
                 bot_started = true;
-                startStopBotToolStripMenuItem.Text = "Stop Bot";
+                startStopBotToolStripMenuItem.Text = "■ Stop Bot";
                 Task.Run(() =>
                 {
                     try
@@ -991,19 +1114,36 @@ namespace PokemonGo.RocketAPI.Window
                         ColoredConsoleWrite(Color.Red, $"Unhandled exception: {ex}");
                     }
                 });
-            } else
+            }
+            else
             {
                 if (!ForceUnbanning)
                 {
                     Stopping = true;
                     ColoredConsoleWrite(Color.Red, $"Stopping the bot.. Waiting for the last action to be complete.");
-                } else
+                }
+                else
                 {
                     ColoredConsoleWrite(Color.Red, $"An action is in play, please wait until it's done.");
                 }
             }
         }

+        private void Client_OnConsoleWrite(ConsoleColor color, string message)
+        {
+            Color c = Color.White;
+            switch (color)
+            {
+                case ConsoleColor.Green:
+                    c = Color.Green;
+                    break;
+                case ConsoleColor.DarkCyan:
+                    c = Color.DarkCyan;
+                    break;
+            }
+            ColoredConsoleWrite(c, message);
+        }
+
         private void showAllToolStripMenuItem3_Click(object sender, EventArgs e)
         {
         }
@@ -1051,7 +1191,7 @@ namespace PokemonGo.RocketAPI.Window

         private async void forceUnbanToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            if (client != null)
+            if (client != null && pokeStops != null)
             {
                 if (ForceUnbanning)
                 {
@@ -1064,7 +1204,7 @@ namespace PokemonGo.RocketAPI.Window
             }
             else
             {
-                ColoredConsoleWrite(Color.Red, "Please start the bot before trying to force unban");
+                ColoredConsoleWrite(Color.Red, "Please start the bot and wait for map to load before trying to force unban");
             }
         }

@@ -1076,7 +1216,7 @@ namespace PokemonGo.RocketAPI.Window
         private void todoToolStripMenuItem_Click(object sender, EventArgs e)
         {
             SettingsForm settingsForm = new SettingsForm();
-            settingsForm.Show();
+            settingsForm.ShowDialog();
         }

         private void pokemonToolStripMenuItem2_Click(object sender, EventArgs e)
@@ -1085,10 +1225,185 @@ namespace PokemonGo.RocketAPI.Window
             pForm.Show();
         }

-        private void mapToolStripMenuItem_Click(object sender, EventArgs e)
+
+
+        #region POKEMON LIST
+        private IEnumerable<PokemonFamily> families;
+
+
+        private void InitializePokemonForm()
         {
-            var mForm = new MapForm(ref client);
-            mForm.Show();
+            objectListView1.ButtonClick += PokemonListButton_Click;
+
+            pkmnName.ImageGetter = delegate (object rowObject)
+           {
+               PokemonData pokemon = (PokemonData)rowObject;
+
+               String key = pokemon.PokemonId.ToString();
+               if (!objectListView1.SmallImageList.Images.ContainsKey(key))
+               {
+                   Image img = GetPokemonImage((int)pokemon.PokemonId);
+                   objectListView1.SmallImageList.Images.Add(key, img);
+               }
+               return key;
+           };
+
+            objectListView1.CellToolTipShowing += delegate (object sender, ToolTipShowingEventArgs args)
+            {
+                PokemonData pokemon = (PokemonData)args.Model;
+                if (args.ColumnIndex == 8)
+                {
+                    int candyOwned = families
+                            .Where(i => (int)i.FamilyId <= (int)pokemon.PokemonId)
+                            .Select(f => f.Candy)
+                            .First();
+                    args.Text = candyOwned + " Candy";
+                }
+            };
+        }
+
+        private Image GetPokemonImage(int pokemonId)
+        {
+            var Sprites = AppDomain.CurrentDomain.BaseDirectory + "Sprites\\";
+            string location = Sprites + pokemonId + ".png";
+            if (!Directory.Exists(Sprites))
+                Directory.CreateDirectory(Sprites);
+            if (!File.Exists(location))
+            {
+                WebClient wc = new WebClient();
+                wc.DownloadFile("http://pokeapi.co/media/sprites/pokemon/" + pokemonId + ".png", @location);
+            }
+            return Image.FromFile(location);
+        }
+
+        private async void ReloadPokemonList()
+        {
+            button1.Enabled = false;
+            objectListView1.Enabled = false;
+
+            client2 = new Client(ClientSettings);
+            try
+            {
+                await client2.Login();
+                await client2.SetServer();
+                var inventory = await client2.GetInventory();
+                var pokemons = inventory.InventoryDelta.InventoryItems.Select(i => i.InventoryItemData?.Pokemon).Where(p => p != null && p?.PokemonId > 0).OrderByDescending(key => key.Cp);
+                families = inventory.InventoryDelta.InventoryItems
+                   .Select(i => i.InventoryItemData?.PokemonFamily)
+                   .Where(p => p != null && (int)p?.FamilyId > 0)
+                   .OrderByDescending(p => (int)p.FamilyId);
+
+                var currentScrollPosition = objectListView1.LowLevelScrollPosition;
+                objectListView1.SetObjects(pokemons);
+                objectListView1.LowLevelScroll(currentScrollPosition.X, currentScrollPosition.Y);
+            }
+            catch (Exception ex) { ColoredConsoleWrite(Color.Red, ex.ToString()); client2 = null; }
+
+            button1.Enabled = true;
+            objectListView1.Enabled = true;
+        }
+
+        private void PokemonListButton_Click(object sender, CellClickEventArgs e)
+        {
+            try
+            {
+                PokemonData pokemon = (PokemonData)e.Model;
+                if (e.ColumnIndex == 6)
+                {
+                    TransferPokemon(pokemon);
+                }
+                else if (e.ColumnIndex == 7)
+                {
+                    PowerUpPokemon(pokemon);
+                }
+                else if (e.ColumnIndex == 8)
+                {
+                    EvolvePokemon(pokemon);
+                }
+            }
+            catch (Exception ex) { ColoredConsoleWrite(Color.Red, ex.ToString()); client2 = null; ReloadPokemonList(); }
+        }
+
+        private async void TransferPokemon(PokemonData pokemon)
+        {
+            if (MessageBox.Show($"Are you sure you want to transfer {pokemon.PokemonId.ToString()} with {pokemon.Cp} CP?", "Confirmation", MessageBoxButtons.YesNo) == DialogResult.Yes)
+            {
+                var transferPokemonResponse = await client2.TransferPokemon(pokemon.Id);
+                string message = "";
+                string caption = "";
+
+                if (transferPokemonResponse.Status == 1)
+                {
+                    message = $"{pokemon.PokemonId} was transferred\n{transferPokemonResponse.CandyAwarded} candy awarded";
+                    caption = $"{pokemon.PokemonId} transferred";
+                    ReloadPokemonList();
+                }
+                else
+                {
+                    message = $"{pokemon.PokemonId} could not be transferred";
+                    caption = $"Transfer {pokemon.PokemonId} failed";
+                }
+
+                MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+        }
+
+        private async void PowerUpPokemon(PokemonData pokemon)
+        {
+            var evolvePokemonResponse = await client2.PowerUp(pokemon.Id);
+            string message = "";
+            string caption = "";
+
+            if (evolvePokemonResponse.Result == 1)
+            {
+                message = $"{pokemon.PokemonId} successfully upgraded.";
+                caption = $"{pokemon.PokemonId} upgraded";
+                ReloadPokemonList();
+            }
+            else
+            {
+                message = $"{pokemon.PokemonId} could not be upgraded";
+                caption = $"Upgrade {pokemon.PokemonId} failed";
+            }
+
+            MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
+        }
+
+        private async void EvolvePokemon(PokemonData pokemon)
+        {
+            var evolvePokemonResponse = await client2.EvolvePokemon(pokemon.Id);
+            string message = "";
+            string caption = "";
+
+            if (evolvePokemonResponse.Result == 1)
+            {
+                message = $"{pokemon.PokemonId} successfully evolved into {evolvePokemonResponse.EvolvedPokemon.PokemonType}\n{evolvePokemonResponse.ExpAwarded} experience awarded\n{evolvePokemonResponse.CandyAwarded} candy awarded";
+                caption = $"{pokemon.PokemonId} evolved into {evolvePokemonResponse.EvolvedPokemon.PokemonType}";
+                ReloadPokemonList();
+            }
+            else
+            {
+                message = $"{pokemon.PokemonId} could not be evolved";
+                caption = $"Evolve {pokemon.PokemonId} failed";
+            }
+
+            MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
+        }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            ReloadPokemonList();
+        }
+        #endregion
+
+        private void pokeToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void objectListView1_SelectedIndexChanged(object sender, EventArgs e)
+        {
+
         }
     }
 }
diff --git a/PokemonGo/RocketAPI/Window/MainForm.resx b/PokemonGo/RocketAPI/Window/MainForm.resx
index 0772257..1821e28 100644
--- a/PokemonGo/RocketAPI/Window/MainForm.resx
+++ b/PokemonGo/RocketAPI/Window/MainForm.resx
@@ -123,6 +123,12 @@
   <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>132, 18</value>
   </metadata>
+  <metadata name="largePokemonImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>357, 18</value>
+  </metadata>
+  <metadata name="smallPokemonImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>247, 18</value>
+  </metadata>
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>58</value>
   </metadata>
diff --git a/PokemonGo/RocketAPI/Window/MapForm.cs b/PokemonGo/RocketAPI/Window/MapForm.cs
index 595a80b..cc49274 100644
--- a/PokemonGo/RocketAPI/Window/MapForm.cs
+++ b/PokemonGo/RocketAPI/Window/MapForm.cs
@@ -50,7 +50,7 @@ namespace PokemonGo.RocketAPI.Window

         private void tmrUpdate_Tick(object sender, EventArgs e)
         {
-            gMapControl1.Position = new PointLatLng(Client.getCurrentLat(), Client.getCurrentLong());
+            gMapControl1.Position = new PointLatLng(Client.CurrentLatitude, Client.CurrentLongitude);
         }
     }
 }
diff --git a/PokemonGo/RocketAPI/Window/PokeUi.Designer.cs b/PokemonGo/RocketAPI/Window/PokeUi.Designer.cs
index 16fa9be..f875958 100644
--- a/PokemonGo/RocketAPI/Window/PokeUi.Designer.cs
+++ b/PokemonGo/RocketAPI/Window/PokeUi.Designer.cs
@@ -28,130 +28,124 @@
         /// </summary>
         private void InitializeComponent()
         {
-			this.components = new System.ComponentModel.Container();
-			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PokeUi));
-			this.listView1 = new System.Windows.Forms.ListView();
-			this.button1 = new System.Windows.Forms.Button();
-			this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
-			this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
-			this.button2 = new System.Windows.Forms.Button();
-			this.button3 = new System.Windows.Forms.Button();
-			this.btnUpgrade = new System.Windows.Forms.Button();
-			this.contextMenuStrip1.SuspendLayout();
-			this.SuspendLayout();
-			//
-			// listView1
-			//
-			this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-            | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-			this.listView1.Location = new System.Drawing.Point(16, 14);
-			this.listView1.Margin = new System.Windows.Forms.Padding(4);
-			this.listView1.Name = "listView1";
-			this.listView1.Size = new System.Drawing.Size(795, 458);
-			this.listView1.TabIndex = 0;
-			this.listView1.UseCompatibleStateImageBehavior = false;
-			this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
-			this.listView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseClick);
-			//
-			// button1
-			//
-			this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-			this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
-			this.button1.Location = new System.Drawing.Point(16, 489);
-			this.button1.Margin = new System.Windows.Forms.Padding(4);
-			this.button1.Name = "button1";
-			this.button1.Size = new System.Drawing.Size(795, 32);
-			this.button1.TabIndex = 3;
-			this.button1.Text = "Reload";
-			this.button1.UseVisualStyleBackColor = true;
-			this.button1.Click += new System.EventHandler(this.button1_Click);
-			//
-			// contextMenuStrip1
-			//
-			this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
-			this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PokeUi));
+            this.btnReload = new System.Windows.Forms.Button();
+            this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
+            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
+            this.btnEvolve = new System.Windows.Forms.Button();
+            this.btnTransfer = new System.Windows.Forms.Button();
+            this.btnUpgrade = new System.Windows.Forms.Button();
+            this.dataGridView1 = new System.Windows.Forms.DataGridView();
+            this.contextMenuStrip1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+            this.SuspendLayout();
+            //
+            // btnReload
+            //
+            this.btnReload.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+            this.btnReload.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.btnReload.Location = new System.Drawing.Point(0, 573);
+            this.btnReload.Name = "btnReload";
+            this.btnReload.Size = new System.Drawing.Size(622, 26);
+            this.btnReload.TabIndex = 3;
+            this.btnReload.Text = "Reload";
+            this.btnReload.UseVisualStyleBackColor = true;
+            this.btnReload.Click += new System.EventHandler(this.button1_Click);
+            //
+            // contextMenuStrip1
+            //
+            this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
+            this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripMenuItem1});
-			this.contextMenuStrip1.Name = "contextMenuStrip1";
-			this.contextMenuStrip1.Size = new System.Drawing.Size(137, 30);
-			//
-			// toolStripMenuItem1
-			//
-			this.toolStripMenuItem1.Name = "toolStripMenuItem1";
-			this.toolStripMenuItem1.Size = new System.Drawing.Size(136, 26);
-			this.toolStripMenuItem1.Text = "Transfer";
-			this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
-			//
-			// button2
-			//
-			this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-			this.button2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
-			this.button2.Location = new System.Drawing.Point(16, 529);
-			this.button2.Margin = new System.Windows.Forms.Padding(4);
-			this.button2.Name = "button2";
-			this.button2.Size = new System.Drawing.Size(795, 32);
-			this.button2.TabIndex = 4;
-			this.button2.Text = "Evolve Selected";
-			this.button2.UseVisualStyleBackColor = true;
-			this.button2.Click += new System.EventHandler(this.button2_Click);
-			//
-			// button3
-			//
-			this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-			this.button3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
-			this.button3.Location = new System.Drawing.Point(16, 609);
-			this.button3.Margin = new System.Windows.Forms.Padding(4);
-			this.button3.Name = "button3";
-			this.button3.Size = new System.Drawing.Size(795, 32);
-			this.button3.TabIndex = 5;
-			this.button3.Text = "Transfer Selected";
-			this.button3.UseVisualStyleBackColor = true;
-			this.button3.Click += new System.EventHandler(this.button3_Click);
-			//
-			// btnUpgrade
-			//
-			this.btnUpgrade.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+            this.contextMenuStrip1.Name = "contextMenuStrip1";
+            this.contextMenuStrip1.Size = new System.Drawing.Size(118, 26);
+            //
+            // toolStripMenuItem1
+            //
+            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
+            this.toolStripMenuItem1.Size = new System.Drawing.Size(117, 22);
+            this.toolStripMenuItem1.Text = "Transfer";
+            this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
+            //
+            // btnEvolve
+            //
+            this.btnEvolve.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+            this.btnEvolve.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.btnEvolve.Location = new System.Drawing.Point(0, 547);
+            this.btnEvolve.Name = "btnEvolve";
+            this.btnEvolve.Size = new System.Drawing.Size(622, 26);
+            this.btnEvolve.TabIndex = 4;
+            this.btnEvolve.Text = "Evolve Selected";
+            this.btnEvolve.UseVisualStyleBackColor = true;
+            this.btnEvolve.Click += new System.EventHandler(this.button2_Click);
+            //
+            // btnTransfer
+            //
+            this.btnTransfer.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+            this.btnTransfer.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.btnTransfer.Location = new System.Drawing.Point(0, 521);
+            this.btnTransfer.Name = "btnTransfer";
+            this.btnTransfer.Size = new System.Drawing.Size(622, 26);
+            this.btnTransfer.TabIndex = 5;
+            this.btnTransfer.Text = "Transfer Selected";
+            this.btnTransfer.UseVisualStyleBackColor = true;
+            this.btnTransfer.Click += new System.EventHandler(this.button3_Click);
+            //
+            // btnUpgrade
+            //
+            this.btnUpgrade.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.btnUpgrade.Location = new System.Drawing.Point(0, 495);
+            this.btnUpgrade.Name = "btnUpgrade";
+            this.btnUpgrade.Size = new System.Drawing.Size(622, 26);
+            this.btnUpgrade.TabIndex = 6;
+            this.btnUpgrade.Text = "Upgrade Selected";
+            this.btnUpgrade.UseVisualStyleBackColor = true;
+            this.btnUpgrade.Click += new System.EventHandler(this.btnUpgrade_Click);
+            //
+            // dataGridView1
+            //
+            this.dataGridView1.AllowUserToAddRows = false;
+            this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
-			this.btnUpgrade.Location = new System.Drawing.Point(16, 569);
-			this.btnUpgrade.Margin = new System.Windows.Forms.Padding(4);
-			this.btnUpgrade.Name = "btnUpgrade";
-			this.btnUpgrade.Size = new System.Drawing.Size(795, 32);
-			this.btnUpgrade.TabIndex = 6;
-			this.btnUpgrade.Text = "Upgrade Selected";
-			this.btnUpgrade.UseVisualStyleBackColor = true;
-			this.btnUpgrade.Click += new System.EventHandler(this.btnUpgrade_Click);
-			//
-			// PokeUi
-			//
-			this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
-			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-			this.ClientSize = new System.Drawing.Size(829, 664);
-			this.Controls.Add(this.btnUpgrade);
-			this.Controls.Add(this.button3);
-			this.Controls.Add(this.button2);
-			this.Controls.Add(this.button1);
-			this.Controls.Add(this.listView1);
-			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
-			this.Margin = new System.Windows.Forms.Padding(4);
-			this.Name = "PokeUi";
-			this.Text = "PokeUi";
-			this.Load += new System.EventHandler(this.PokeUi_Load);
-			this.contextMenuStrip1.ResumeLayout(false);
-			this.ResumeLayout(false);
+            this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
+            this.dataGridView1.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
+            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dataGridView1.Location = new System.Drawing.Point(12, 12);
+            this.dataGridView1.Name = "dataGridView1";
+            this.dataGridView1.Size = new System.Drawing.Size(596, 477);
+            this.dataGridView1.TabIndex = 7;
+            this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
+            this.dataGridView1.SortCompare += new System.Windows.Forms.DataGridViewSortCompareEventHandler(this.dataGridView1_SortCompare);
+            //
+            // PokeUi
+            //
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(622, 599);
+            this.Controls.Add(this.dataGridView1);
+            this.Controls.Add(this.btnUpgrade);
+            this.Controls.Add(this.btnTransfer);
+            this.Controls.Add(this.btnEvolve);
+            this.Controls.Add(this.btnReload);
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+            this.Name = "PokeUi";
+            this.Text = "PokeUi";
+            this.Load += new System.EventHandler(this.PokeUi_Load);
+            this.contextMenuStrip1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+            this.ResumeLayout(false);

         }

         #endregion
-
-        private System.Windows.Forms.ListView listView1;
-        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Button btnReload;
         private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
         private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
-        private System.Windows.Forms.Button button2;
-        private System.Windows.Forms.Button button3;
-		private System.Windows.Forms.Button btnUpgrade;
-	}
+        private System.Windows.Forms.Button btnEvolve;
+        private System.Windows.Forms.Button btnTransfer;
+        private System.Windows.Forms.Button btnUpgrade;
+        private System.Windows.Forms.DataGridView dataGridView1;
+    }
 }
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/Window/PokeUi.cs b/PokemonGo/RocketAPI/Window/PokeUi.cs
index 3ee7962..3c162ab 100644
--- a/PokemonGo/RocketAPI/Window/PokeUi.cs
+++ b/PokemonGo/RocketAPI/Window/PokeUi.cs
@@ -38,15 +38,9 @@ namespace PokemonGo.RocketAPI.Window

             try
             {
-                switch (ClientSettings.AuthType)
-                {
-                    case AuthType.Ptc:
-                        await client.DoPtcLogin(ClientSettings.PtcUsername, ClientSettings.PtcPassword);
-                        break;
-                    case AuthType.Google:
-                        await client.DoGoogleLogin(ClientSettings.Email, ClientSettings.Password);
-                        break;
-                }
+
+                await client.Login();
+
                 await client.SetServer();
                 var profile = await client.GetProfile();
                 var inventory = await client.GetInventory();
@@ -61,15 +55,33 @@ namespace PokemonGo.RocketAPI.Window
                     .OrderByDescending(p => (int)p.FamilyId);


+                //listView1.ShowItemToolTips = true;

-                var imageSize = ClientSettings.ImageSize;
-
-                if ((imageSize > 96) || (imageSize < 1)) // no bigger than orig size and no smaller than 1x1
-                    imageSize = 50;

-                var imageList = new ImageList { ImageSize = new Size(imageSize, imageSize) };
-                //var imageList = new ImageList { ImageSize = new Size(96, 96) };
-                listView1.ShowItemToolTips = true;
+                //put data into gridview
+                this.dataGridView1.AutoGenerateColumns = false;
+                DataGridViewCheckBoxColumn checkbox = new DataGridViewCheckBoxColumn()
+                {
+                    HeaderText = "Checkbox",
+                    Name = "Checkbox",
+                    Visible = true
+                };
+                // add the new column to your dataGridView
+                this.dataGridView1.Columns.Insert(0, checkbox);
+                this.dataGridView1.Columns.Add("Image", "Image");
+                this.dataGridView1.Columns.Add("Name", "Name");
+                this.dataGridView1.Columns.Add("CP", "CP");
+                this.dataGridView1.Columns.Add("IV %", "IV %");
+                this.dataGridView1.Columns.Add("Candy", "Candy");
+                this.dataGridView1.Columns.Add("Number", "Number");
+                this.dataGridView1.Columns.Add("WeightKg", "WeightKg");
+                this.dataGridView1.Columns.Add("HeightM", "HeightM");
+
+                this.dataGridView1.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
+                for (int i = 1; i < this.dataGridView1.Columns.Count; i++)
+                {
+                    this.dataGridView1.Columns[i].ReadOnly = true;
+                }

                 foreach (var pokemon in pokemons)
                 {
@@ -78,35 +90,35 @@ namespace PokemonGo.RocketAPI.Window
                     {
                         pokemonImage = GetPokemonImage((int)pokemon.PokemonId);
                     });
-                    imageList.Images.Add(pokemon.PokemonId.ToString(), pokemonImage);
-
-                    listView1.LargeImageList = imageList;
-                    var listViewItem = new ListViewItem();
-                    listViewItem.Tag = pokemon;
-

                     var currentCandy = families
                         .Where(i => (int)i.FamilyId <= (int)pokemon.PokemonId)
                         .Select(f => f.Candy)
                         .First();
                     var currIv = Math.Round(Perfect(pokemon));
-                    //listViewItem.SubItems.Add();
-                    listViewItem.ImageKey = pokemon.PokemonId.ToString();
+

                     var pokemonId2 = pokemon.PokemonId;
                     var pokemonName = pokemon.Id;

-                    listViewItem.Text = string.Format("{0}\n{1} CP", pokemon.PokemonId, pokemon.Cp);
-                    listViewItem.ToolTipText = currentCandy + " Candy\n" + currIv + "% IV";
-
-
-                    this.listView1.Items.Add(listViewItem);
-
+                    var row = new DataGridViewRow();
+                    //row.HeaderCell.Value = row.Index + 1 + "";
+                    row.Cells.Add(new DataGridViewCheckBoxCell { Value = false });
+                    row.Cells.Add(new DataGridViewImageCell { Value = pokemonImage });
+                    row.Cells.Add(new DataGridViewTextBoxCell { Value = pokemon.PokemonId });
+                    row.Cells.Add(new DataGridViewTextBoxCell { Value = pokemon.Cp });
+                    row.Cells.Add(new DataGridViewTextBoxCell { Value = currIv });
+                    row.Cells.Add(new DataGridViewTextBoxCell { Value = currentCandy });
+                    row.Cells.Add(new DataGridViewTextBoxCell { Value = (int)pokemon.PokemonId });
+                    row.Cells.Add(new DataGridViewTextBoxCell { Value = pokemon.WeightKg });
+                    row.Cells.Add(new DataGridViewTextBoxCell { Value = pokemon.HeightM });
+                    row.Tag = pokemon;
+                    this.dataGridView1.Rows.Add(row);
                 }
+
                 this.Text = "PokeUi " + pokemons.Count<PokemonData>() + "/" + profile.Profile.PokeStorage;
                 EnabledButton(true);

-
             }
             catch (TaskCanceledException) { Execute(); }
             catch (UriFormatException) { Execute(); }
@@ -118,9 +130,9 @@ namespace PokemonGo.RocketAPI.Window

         private void EnabledButton(bool enabled)
         {
-            button1.Enabled = enabled;
-            button2.Enabled = enabled;
-            button3.Enabled = enabled;
+            btnReload.Enabled = enabled;
+            btnEvolve.Enabled = enabled;
+            btnTransfer.Enabled = enabled;
             btnUpgrade.Enabled = enabled;
         }

@@ -135,15 +147,23 @@ namespace PokemonGo.RocketAPI.Window
                 WebClient wc = new WebClient();
                 wc.DownloadFile("http://pokeapi.co/media/sprites/pokemon/" + pokemonId + ".png", @location);
             }
+
+            var imageSize = ClientSettings.ImageSize;
+
+            if ((imageSize > 96) || (imageSize < 1)) // no bigger than orig size and no smaller than 1x1
+                imageSize = 50;
+
             PictureBox picbox = new PictureBox();
             picbox.Image = Image.FromFile(location);
-            Bitmap bitmapRemote = (Bitmap)picbox.Image;
+            Bitmap bitmapRemote = new Bitmap(picbox.Image, imageSize, imageSize);
             return bitmapRemote;
         }

         private void button1_Click(object sender, EventArgs e)
         {
-            this.listView1.Clear();
+            this.dataGridView1.DataSource = null;
+            this.dataGridView1.Columns.Clear();
+            this.dataGridView1.Rows.Clear();
             Execute();
         }

@@ -156,52 +176,62 @@ namespace PokemonGo.RocketAPI.Window
             return ((float)(poke.IndividualAttack + poke.IndividualDefense + poke.IndividualStamina) / (3.0f * 15.0f)) * 100.0f;
         }

-        private void listView1_MouseClick(object sender, MouseEventArgs e)
+        /*private void listView1_MouseClick(object sender, MouseEventArgs e)
         {
             if (e.Button == MouseButtons.Right)
             {
+                this.dataGridView1.
                 if (listView1.FocusedItem.Bounds.Contains(e.Location) == true)
                 {
                     contextMenuStrip1.Show(Cursor.Position);
                 }
             }
-        }
+        }*/

         private async void toolStripMenuItem1_Click(object sender, EventArgs e)
         {
-            var pokemon = (PokemonData)listView1.SelectedItems[0].Tag;
+            var pokemon = (PokemonData)this.dataGridView1.SelectedRows[0].Tag;


             if (MessageBox.Show(this, pokemon.PokemonId + " with " + pokemon.Cp + " CP thats " + Math.Round(Perfect(pokemon)) + "% perfect", "Are you sure you want to transfer?", MessageBoxButtons.OKCancel) == DialogResult.OK)
             {
                 var transfer = await client.TransferPokemon(pokemon.Id);
             }
-            listView1.Items.Remove(listView1.SelectedItems[0]);
+            this.dataGridView1.Rows.Remove(this.dataGridView1.SelectedRows[0]);
         }

         private async void button2_Click(object sender, EventArgs e)
         {
-            var selectedItems = this.listView1.SelectedItems;

-            foreach (ListViewItem selectedItem in selectedItems)
+            IEnumerable<DataGridViewRow> selectedItems = (from row in dataGridView1.Rows.Cast<DataGridViewRow>()
+                                                          where Convert.ToBoolean(((DataGridViewCheckBoxCell)row.Cells["Checkbox"]).EditedFormattedValue)
+                                                          select row).ToList();
+
+            foreach (DataGridViewRow selectedItem in selectedItems)
             {
                 await evolvePokemon((PokemonData)selectedItem.Tag);
             }

-            this.listView1.Clear();
+            this.dataGridView1.DataSource = null;
+            this.dataGridView1.Columns.Clear();
+            this.dataGridView1.Rows.Clear();
             Execute();
         }

         private async void button3_Click(object sender, EventArgs e)
         {
-            var selectedItems = this.listView1.SelectedItems;
+            IEnumerable<DataGridViewRow> selectedItems = (from row in dataGridView1.Rows.Cast<DataGridViewRow>()
+                                                          where Convert.ToBoolean(((DataGridViewCheckBoxCell)row.Cells["Checkbox"]).EditedFormattedValue)
+                                                          select row).ToList();

-            foreach (ListViewItem selectedItem in selectedItems)
+            foreach (DataGridViewRow selectedItem in selectedItems)
             {
                 await transferPokemon((PokemonData)selectedItem.Tag);
             }

-            this.listView1.Clear();
+            this.dataGridView1.DataSource = null;
+            this.dataGridView1.Columns.Clear();
+            this.dataGridView1.Rows.Clear();
             Execute();
         }

@@ -269,14 +299,18 @@ namespace PokemonGo.RocketAPI.Window

         private async void btnUpgrade_Click(object sender, EventArgs e)
         {
-            var selectedItems = listView1.SelectedItems;
+            IEnumerable<DataGridViewRow> selectedItems = (from row in dataGridView1.Rows.Cast<DataGridViewRow>()
+                                                          where Convert.ToBoolean(((DataGridViewCheckBoxCell)row.Cells["Checkbox"]).EditedFormattedValue)
+                                                          select row).ToList();

-            foreach (ListViewItem selectedItem in selectedItems)
+            foreach (DataGridViewRow selectedItem in selectedItems)
             {
                 await PowerUp((PokemonData)selectedItem.Tag);
             }

-            listView1.Clear();
+            this.dataGridView1.DataSource = null;
+            this.dataGridView1.Columns.Clear();
+            this.dataGridView1.Rows.Clear();
             Execute();
         }

@@ -310,5 +344,43 @@ namespace PokemonGo.RocketAPI.Window
             catch (NullReferenceException) { await PowerUp(pokemon); }
             catch (Exception ex) { await PowerUp(pokemon); }
         }
+
+        private void dataGridView1_SortCompare(object sender, DataGridViewSortCompareEventArgs e)
+        {
+            //sort the numeric column
+            if (!e.Column.Name.Equals("Name") && !e.Column.Name.Equals("Image"))
+            {
+                e.SortResult = (Convert.ToDouble(e.CellValue1) - Convert.ToDouble(e.CellValue2) > 0) ? 1 : (Convert.ToDouble(e.CellValue1) - Convert.ToDouble(e.CellValue2) < 0) ? -1 : 0;
+            }
+
+            // if the value is same, then sort by IV
+            if (e.SortResult == 0 && e.Column.Name.Equals("IV %"))
+            {
+                e.SortResult = Convert.ToInt32(this.dataGridView1.Rows[e.RowIndex1].Cells["IV %"].Value.ToString()) -
+                        Convert.ToInt32(this.dataGridView1.Rows[e.RowIndex2].Cells["IV %"].Value.ToString());
+            }
+
+            e.Handled = true;
+        }
+
+
+        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
+        {
+            if (e.ColumnIndex != 0)
+                return;
+
+            bool isChecked = Convert.ToBoolean(this.dataGridView1.Rows[e.RowIndex].Cells["Checkbox"].EditedFormattedValue);
+
+            if (isChecked)
+            {
+                this.dataGridView1.Rows[e.RowIndex].Cells["Checkbox"].Value = true;
+                this.dataGridView1.Rows[e.RowIndex].Selected = true;
+            }
+            else
+            {
+                this.dataGridView1.Rows[e.RowIndex].Cells["Checkbox"].Value = false;
+                this.dataGridView1.Rows[e.RowIndex].Selected = false;
+            }
+        }
     }
-}
+}
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/Window/PokemonForm.cs b/PokemonGo/RocketAPI/Window/PokemonForm.cs
index 6f36da2..c558040 100644
--- a/PokemonGo/RocketAPI/Window/PokemonForm.cs
+++ b/PokemonGo/RocketAPI/Window/PokemonForm.cs
@@ -32,22 +32,15 @@ namespace PokemonGo.RocketAPI.Window

             try
             {
-                switch (ClientSettings.AuthType)
-                {
-                    case AuthType.Ptc:
-                        await client.DoPtcLogin(ClientSettings.PtcUsername, ClientSettings.PtcPassword);
-                        break;
-                    case AuthType.Google:
-                        await client.DoGoogleLogin(ClientSettings.Email, ClientSettings.Password);
-                        break;
-                }
+
+                await client.Login();

                 await client.SetServer();
                 var inventory = await client.GetInventory();
                 var pokemons =
                     inventory.InventoryDelta.InventoryItems.Select(i => i.InventoryItemData?.Pokemon)
                         .Where(p => p != null && p?.PokemonId > 0).OrderByDescending(key => key.Cp);
-
+

                 foreach (var pokemon in pokemons)
                 {
diff --git a/PokemonGo/RocketAPI/Window/PokemonGo.RocketAPI.Window.csproj b/PokemonGo/RocketAPI/Window/PokemonGo.RocketAPI.Window.csproj
index 1c8ccf1..2d856d8 100644
--- a/PokemonGo/RocketAPI/Window/PokemonGo.RocketAPI.Window.csproj
+++ b/PokemonGo/RocketAPI/Window/PokemonGo.RocketAPI.Window.csproj
@@ -38,6 +38,10 @@
   <PropertyGroup>
     <NoWin32Manifest>true</NoWin32Manifest>
   </PropertyGroup>
+  <PropertyGroup>
+    <StartupObject>
+    </StartupObject>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="GMap.NET.Core">
       <HintPath>lib\GMap.NET.Core.dll</HintPath>
@@ -48,6 +52,14 @@
     <Reference Include="Google.Protobuf">
       <HintPath>..\..\..\packages\Google.Protobuf.3.0.0-beta3\lib\dotnet\Google.Protobuf.dll</HintPath>
     </Reference>
+    <Reference Include="ObjectListView, Version=2.9.1.1072, Culture=neutral, PublicKeyToken=b1c5bf581481bcd4, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\ObjectListView.Official.2.9.1\lib\net20\ObjectListView.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="S2Geometry, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\S2Geometry.1.0.3\lib\portable-net45+wp8+win8\S2Geometry.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Configuration" />
     <Reference Include="System.Core" />
@@ -84,6 +96,7 @@
     <Compile Include="PokemonForm.Designer.cs">
       <DependentUpon>PokemonForm.cs</DependentUpon>
     </Compile>
+    <Compile Include="RouteOptimizer.cs" />
     <Compile Include="PokeUi.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -92,6 +105,7 @@
     </Compile>
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="S2GMapDrawer.cs" />
     <Compile Include="Settings.cs" />
     <Compile Include="SettingsForm.cs">
       <SubType>Form</SubType>
diff --git a/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs b/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs
index 3402d68..66e91a5 100644
--- a/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs
+++ b/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.7.0.1")]
+[assembly: AssemblyVersion("1.7.2.1")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/PokemonGo/RocketAPI/Window/RouteOptimizer.cs b/PokemonGo/RocketAPI/Window/RouteOptimizer.cs
new file mode 100644
index 0000000..8f8a73e
--- /dev/null
+++ b/PokemonGo/RocketAPI/Window/RouteOptimizer.cs
@@ -0,0 +1,150 @@
+using GMap.NET;
+using GMap.NET.WindowsForms;
+using PokemonGo.RocketAPI.GeneratedCode;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace PokemonGo.RocketAPI.Window
+{
+    public static class RouteOptimizer
+    {
+        public static List<FortData> Optimize(FortData[] pokeStops, LatLong latlng, GMapOverlay routeOverlay)
+        {
+            List<FortData> optimizedRoute = new List<FortData>(pokeStops);
+
+            // NN
+            FortData NN = FindNN(optimizedRoute, latlng.Latitude, latlng.Longitude);
+            optimizedRoute.Remove(NN);
+            optimizedRoute.Insert(0, NN);
+            for (int i = 1; i < pokeStops.Length; i++)
+            {
+                NN = FindNN(optimizedRoute.Skip(i), NN.Latitude, NN.Longitude);
+                optimizedRoute.Remove(NN);
+                optimizedRoute.Insert(i, NN);
+                Visualize(optimizedRoute, routeOverlay);
+            }
+
+            // 2-Opt
+            bool isOptimized;
+            do
+            {
+                optimizedRoute = Optimize2Opt(optimizedRoute, out isOptimized);
+                Visualize(optimizedRoute, routeOverlay);
+            }
+            while (isOptimized);
+
+            return optimizedRoute;
+        }
+
+        private static void Visualize(List<FortData> pokeStops, GMapOverlay routeOverlay)
+        {
+            MainForm.synchronizationContext.Post(new SendOrPostCallback(o =>
+            {
+                List<FortData> p = new List<FortData>((List<FortData>)o);
+                routeOverlay.Markers.Clear();
+                List<PointLatLng> routePoint = new List<PointLatLng>();
+                foreach (var pokeStop in p)
+                {
+                    var pokeStopLoc = new PointLatLng(pokeStop.Latitude, pokeStop.Longitude);
+
+                    routePoint.Add(pokeStopLoc);
+                }
+                routeOverlay.Routes.Clear();
+                routeOverlay.Routes.Add(new GMapRoute(routePoint, "Walking Path"));
+            }), pokeStops);
+        }
+
+        private static List<FortData> Optimize2Opt(List<FortData> pokeStops, out bool isOptimized)
+        {
+            int n = pokeStops.Count;
+            float bestGain = 0;
+            int bestI = -1;
+            int bestJ = -1;
+
+            for (int ai = 0; ai < n; ai++)
+            {
+                for (int ci = 0; ci < n; ci++)
+                {
+                    int bi = (ai + 1) % n;
+                    int di = (ci + 1) % n;
+
+                    FortData a = pokeStops[ai];
+                    FortData b = pokeStops[bi];
+                    FortData c = pokeStops[ci];
+                    FortData d = pokeStops[di];
+
+                    float ab = GetDistance(a, b);
+                    float cd = GetDistance(c, d);
+                    float ac = GetDistance(a, c);
+                    float bd = GetDistance(b, d);
+
+                    if (ci != ai && ci != bi)
+                    {
+                        float gain = (ab + cd) - (ac + bd);
+                        if (gain > bestGain)
+                        {
+                            bestGain = gain;
+                            bestI = bi;
+                            bestJ = ci;
+                        }
+                    }
+                }
+            }
+
+            if (bestI != -1)
+            {
+                List<FortData> optimizedRoute;
+                if (bestI > bestJ)
+                {
+                    optimizedRoute = new List<FortData>();
+                    optimizedRoute.Add(pokeStops[0]);
+                    optimizedRoute.AddRange(pokeStops.Skip(bestI));
+                    optimizedRoute.Reverse(1, n - bestI);
+                    optimizedRoute.AddRange(pokeStops.GetRange(bestJ + 1, bestI - bestJ - 1));
+                    optimizedRoute.AddRange(pokeStops.GetRange(1, bestJ));
+                    optimizedRoute.Reverse(n - bestJ, bestJ);
+                }
+                else if (bestI == 0)
+                {
+                    optimizedRoute = new List<FortData>(pokeStops);
+                    optimizedRoute.Reverse(bestJ + 1, n - bestJ - 1);
+                }
+                else
+                {
+                    optimizedRoute = new List<FortData>(pokeStops);
+                    optimizedRoute.Reverse(bestI, bestJ - bestI + 1);
+                }
+
+                isOptimized = true;
+                return optimizedRoute;
+            }
+            isOptimized = false;
+            return pokeStops;
+        }
+
+        private static FortData FindNN(IEnumerable<FortData> pokeStops, double cLatitude, double cLongitude)
+        {
+            return pokeStops.OrderBy(p => GetDistance(cLatitude, cLongitude, p.Latitude, p.Longitude)).First();
+        }
+
+        private static float GetDistance(FortData a, FortData b)
+        {
+            return GetDistance(a.Latitude, a.Longitude, b.Latitude, b.Longitude);
+        }
+
+        private static float GetDistance(double lat1, double lng1, double lat2, double lng2)
+        {
+            double R = 6371e3;
+            Func<double, float> toRad = x => (float)(x * (Math.PI / 180));
+            lat1 = toRad(lat1);
+            lat2 = toRad(lat2);
+            float dLng = toRad(lng2 - lng1);
+
+            return (float)(Math.Acos(Math.Sin(lat1) * Math.Sin(lat2) + Math.Cos(lat1) * Math.Cos(lat2) * Math.Cos(dLng)) * R);
+        }
+    }
+}
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/Window/S2GMapDrawer.cs b/PokemonGo/RocketAPI/Window/S2GMapDrawer.cs
new file mode 100644
index 0000000..7fc3371
--- /dev/null
+++ b/PokemonGo/RocketAPI/Window/S2GMapDrawer.cs
@@ -0,0 +1,36 @@
+using Google.Common.Geometry;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using GMap.NET.WindowsForms;
+using GMap.NET.WindowsForms.Markers;
+using GMap.NET;
+using System.Drawing;
+
+namespace PokemonGo.RocketAPI.Window
+{
+    class S2GMapDrawer
+    {
+        public static void DrawS2Cells(List<ulong> cellsIds, GMapOverlay mapLayer)
+        {
+            for (int i=0; i<cellsIds.Count; i++)
+            {
+                S2CellId cellId = new S2CellId(cellsIds[i]);
+                S2Cell cell = new S2Cell(cellId);
+
+                List<PointLatLng> points = new List<PointLatLng>();
+                for (int j=0; j<4; j++)
+                {
+                    S2LatLng point = new S2LatLng(cell.GetVertex(j));
+                    points.Add(new PointLatLng(point.LatDegrees, point.LngDegrees));
+                }
+                GMapPolygon polygon = new GMapPolygon(points, "mypolygon");
+                polygon.Fill = new SolidBrush(Color.FromArgb(50, Color.Red));
+                polygon.Stroke = new Pen(Color.Red, 1);
+                mapLayer.Polygons.Add(polygon);
+            }
+        }
+    }
+}
diff --git a/PokemonGo/RocketAPI/Window/Settings.cs b/PokemonGo/RocketAPI/Window/Settings.cs
index 9f238c2..5bbbf9f 100644
--- a/PokemonGo/RocketAPI/Window/Settings.cs
+++ b/PokemonGo/RocketAPI/Window/Settings.cs
@@ -86,18 +86,29 @@ namespace PokemonGo.RocketAPI.Window

         public bool Recycler => GetSetting() != string.Empty && Convert.ToBoolean(GetSetting(), CultureInfo.InvariantCulture);

+        private int MaxItemPokeBall => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+        private int MaxItemGreatBall => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+        private int MaxItemUltraBall => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+        private int MaxItemMasterBall => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+        private int MaxItemRazzBerry => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+        private int MaxItemRevive => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+        private int MaxItemPotion => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+        private int MaxItemSuperPotion => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+        private int MaxItemHyperPotion => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+        private int MaxItemMaxPotion => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+
         ICollection<KeyValuePair<ItemId, int>> ISettings.ItemRecycleFilter => new[]
         {
-            new KeyValuePair<ItemId, int>(ItemId.ItemPokeBall, 20),
-            new KeyValuePair<ItemId, int>(ItemId.ItemGreatBall, 50),
-            new KeyValuePair<ItemId, int>(ItemId.ItemUltraBall, 100),
-            new KeyValuePair<ItemId, int>(ItemId.ItemMasterBall, 200),
-            new KeyValuePair<ItemId, int>(ItemId.ItemRazzBerry, 20),
-            new KeyValuePair<ItemId, int>(ItemId.ItemRevive, 20),
-            new KeyValuePair<ItemId, int>(ItemId.ItemPotion, 0),
-            new KeyValuePair<ItemId, int>(ItemId.ItemSuperPotion, 0),
-            new KeyValuePair<ItemId, int>(ItemId.ItemHyperPotion, 50),
-            new KeyValuePair<ItemId, int>(ItemId.ItemMaxPotion, 100)
+            new KeyValuePair<ItemId, int>(ItemId.ItemPokeBall, MaxItemPokeBall),
+            new KeyValuePair<ItemId, int>(ItemId.ItemGreatBall, MaxItemGreatBall),
+            new KeyValuePair<ItemId, int>(ItemId.ItemUltraBall, MaxItemUltraBall),
+            new KeyValuePair<ItemId, int>(ItemId.ItemMasterBall, MaxItemMasterBall),
+            new KeyValuePair<ItemId, int>(ItemId.ItemRazzBerry, MaxItemRazzBerry),
+            new KeyValuePair<ItemId, int>(ItemId.ItemRevive, MaxItemRevive),
+            new KeyValuePair<ItemId, int>(ItemId.ItemPotion, MaxItemPotion),
+            new KeyValuePair<ItemId, int>(ItemId.ItemSuperPotion, MaxItemSuperPotion),
+            new KeyValuePair<ItemId, int>(ItemId.ItemHyperPotion, MaxItemHyperPotion),
+            new KeyValuePair<ItemId, int>(ItemId.ItemMaxPotion, MaxItemMaxPotion)
         };

         public int RecycleItemsInterval => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 60;
diff --git a/PokemonGo/RocketAPI/Window/SettingsForm.Designer.cs b/PokemonGo/RocketAPI/Window/SettingsForm.Designer.cs
index 9d34f6d..3232162 100644
--- a/PokemonGo/RocketAPI/Window/SettingsForm.Designer.cs
+++ b/PokemonGo/RocketAPI/Window/SettingsForm.Designer.cs
@@ -30,8 +30,8 @@
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm));
             this.authTypeLabel = new System.Windows.Forms.Label();
             this.authTypeCb = new System.Windows.Forms.ComboBox();
-            this.ptcUserLabel = new System.Windows.Forms.Label();
-            this.ptcPasswordLabel = new System.Windows.Forms.Label();
+            this.UserLabel = new System.Windows.Forms.Label();
+            this.PasswordLabel = new System.Windows.Forms.Label();
             this.latLabel = new System.Windows.Forms.Label();
             this.longiLabel = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
@@ -39,8 +39,8 @@
             this.label3 = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
-            this.ptcUserText = new System.Windows.Forms.TextBox();
-            this.ptcPassText = new System.Windows.Forms.TextBox();
+            this.UserLoginBox = new System.Windows.Forms.TextBox();
+            this.UserPasswordBox = new System.Windows.Forms.TextBox();
             this.latitudeText = new System.Windows.Forms.TextBox();
             this.longitudeText = new System.Windows.Forms.TextBox();
             this.razzmodeCb = new System.Windows.Forms.ComboBox();
@@ -55,18 +55,12 @@
             this.AdressBox = new System.Windows.Forms.TextBox();
             this.trackBar = new System.Windows.Forms.TrackBar();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.TravelSpeedBox = new System.Windows.Forms.TextBox();
             this.CatchPokemonBox = new System.Windows.Forms.CheckBox();
             this.CatchPokemonText = new System.Windows.Forms.Label();
             this.transferIVThresText = new System.Windows.Forms.TextBox();
             this.TravelSpeedText = new System.Windows.Forms.Label();
-            this.TravelSpeedBox = new System.Windows.Forms.TextBox();
             this.label6 = new System.Windows.Forms.Label();
-            this.EmailLoginText = new System.Windows.Forms.Label();
-            this.EmailPasswordText = new System.Windows.Forms.Label();
-            this.EmailLoginBox = new System.Windows.Forms.TextBox();
-            this.EmailPasswordBox = new System.Windows.Forms.TextBox();
-            this.label7 = new System.Windows.Forms.Label();
-            this.ImageSizeBox = new System.Windows.Forms.TextBox();
             this.groupBox1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.trackBar)).BeginInit();
             this.panel1.SuspendLayout();
@@ -77,7 +71,7 @@
             this.authTypeLabel.AutoSize = true;
             this.authTypeLabel.Location = new System.Drawing.Point(3, 7);
             this.authTypeLabel.Name = "authTypeLabel";
-            this.authTypeLabel.Size = new System.Drawing.Size(63, 13);
+            this.authTypeLabel.Size = new System.Drawing.Size(71, 12);
             this.authTypeLabel.TabIndex = 0;
             this.authTypeLabel.Text = "Login Type:";
             this.authTypeLabel.Click += new System.EventHandler(this.authTypeLabel_Click);
@@ -88,72 +82,72 @@
             this.authTypeCb.Items.AddRange(new object[] {
             "google",
             "Ptc"});
-            this.authTypeCb.Location = new System.Drawing.Point(68, 4);
+            this.authTypeCb.Location = new System.Drawing.Point(82, 4);
             this.authTypeCb.Name = "authTypeCb";
-            this.authTypeCb.Size = new System.Drawing.Size(136, 21);
+            this.authTypeCb.Size = new System.Drawing.Size(136, 20);
             this.authTypeCb.TabIndex = 1;
             this.authTypeCb.SelectedIndexChanged += new System.EventHandler(this.authTypeCb_SelectedIndexChanged);
             //
-            // ptcUserLabel
+            // UserLabel
             //
-            this.ptcUserLabel.AutoSize = true;
-            this.ptcUserLabel.Location = new System.Drawing.Point(3, 36);
-            this.ptcUserLabel.Name = "ptcUserLabel";
-            this.ptcUserLabel.Size = new System.Drawing.Size(58, 13);
-            this.ptcUserLabel.TabIndex = 2;
-            this.ptcUserLabel.Text = "Username:";
+            this.UserLabel.AutoSize = true;
+            this.UserLabel.Location = new System.Drawing.Point(3, 33);
+            this.UserLabel.Name = "UserLabel";
+            this.UserLabel.Size = new System.Drawing.Size(59, 12);
+            this.UserLabel.TabIndex = 2;
+            this.UserLabel.Text = "Username:";
             //
-            // ptcPasswordLabel
+            // PasswordLabel
             //
-            this.ptcPasswordLabel.AutoSize = true;
-            this.ptcPasswordLabel.Location = new System.Drawing.Point(3, 62);
-            this.ptcPasswordLabel.Name = "ptcPasswordLabel";
-            this.ptcPasswordLabel.Size = new System.Drawing.Size(56, 13);
-            this.ptcPasswordLabel.TabIndex = 3;
-            this.ptcPasswordLabel.Text = "Password:";
+            this.PasswordLabel.AutoSize = true;
+            this.PasswordLabel.Location = new System.Drawing.Point(3, 57);
+            this.PasswordLabel.Name = "PasswordLabel";
+            this.PasswordLabel.Size = new System.Drawing.Size(59, 12);
+            this.PasswordLabel.TabIndex = 3;
+            this.PasswordLabel.Text = "Password:";
             //
             // latLabel
             //
             this.latLabel.AutoSize = true;
-            this.latLabel.Location = new System.Drawing.Point(3, 88);
+            this.latLabel.Location = new System.Drawing.Point(3, 81);
             this.latLabel.Name = "latLabel";
-            this.latLabel.Size = new System.Drawing.Size(48, 13);
+            this.latLabel.Size = new System.Drawing.Size(59, 12);
             this.latLabel.TabIndex = 4;
             this.latLabel.Text = "Latitude:";
             //
             // longiLabel
             //
             this.longiLabel.AutoSize = true;
-            this.longiLabel.Location = new System.Drawing.Point(3, 114);
+            this.longiLabel.Location = new System.Drawing.Point(3, 105);
             this.longiLabel.Name = "longiLabel";
-            this.longiLabel.Size = new System.Drawing.Size(57, 13);
+            this.longiLabel.Size = new System.Drawing.Size(65, 12);
             this.longiLabel.TabIndex = 5;
             this.longiLabel.Text = "Longitude:";
             //
             // label1
             //
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(3, 140);
+            this.label1.Location = new System.Drawing.Point(3, 129);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(87, 13);
+            this.label1.Size = new System.Drawing.Size(95, 12);
             this.label1.TabIndex = 6;
             this.label1.Text = "Razzberry Mode:";
             //
             // label2
             //
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(3, 193);
+            this.label2.Location = new System.Drawing.Point(3, 178);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(76, 13);
+            this.label2.Size = new System.Drawing.Size(89, 12);
             this.label2.TabIndex = 7;
             this.label2.Text = "Transfer Type:";
             //
             // label3
             //
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(3, 321);
+            this.label3.Location = new System.Drawing.Point(3, 296);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(91, 13);
+            this.label3.Size = new System.Drawing.Size(95, 12);
             this.label3.TabIndex = 8;
             this.label3.Text = "Evolve Pokemon:";
             this.label3.Click += new System.EventHandler(this.label3_Click);
@@ -161,49 +155,49 @@
             // label4
             //
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(3, 220);
+            this.label4.Location = new System.Drawing.Point(3, 203);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(74, 13);
+            this.label4.Size = new System.Drawing.Size(83, 12);
             this.label4.TabIndex = 9;
             this.label4.Text = "CP Threshold:";
             //
             // label5
             //
             this.label5.AutoSize = true;
-            this.label5.Location = new System.Drawing.Point(3, 167);
+            this.label5.Location = new System.Drawing.Point(3, 154);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(93, 13);
+            this.label5.Size = new System.Drawing.Size(113, 12);
             this.label5.TabIndex = 10;
             this.label5.Text = "Razzberry Setting:";
             //
-            // ptcUserText
+            // UserLoginBox
             //
-            this.ptcUserText.Location = new System.Drawing.Point(68, 33);
-            this.ptcUserText.Name = "ptcUserText";
-            this.ptcUserText.Size = new System.Drawing.Size(136, 20);
-            this.ptcUserText.TabIndex = 11;
+            this.UserLoginBox.Location = new System.Drawing.Point(82, 31);
+            this.UserLoginBox.Name = "UserLoginBox";
+            this.UserLoginBox.Size = new System.Drawing.Size(136, 21);
+            this.UserLoginBox.TabIndex = 11;
             //
-            // ptcPassText
+            // UserPasswordBox
             //
-            this.ptcPassText.Location = new System.Drawing.Point(68, 62);
-            this.ptcPassText.Name = "ptcPassText";
-            this.ptcPassText.Size = new System.Drawing.Size(136, 20);
-            this.ptcPassText.TabIndex = 12;
+            this.UserPasswordBox.Location = new System.Drawing.Point(82, 57);
+            this.UserPasswordBox.Name = "UserPasswordBox";
+            this.UserPasswordBox.Size = new System.Drawing.Size(136, 21);
+            this.UserPasswordBox.TabIndex = 12;
             //
             // latitudeText
             //
-            this.latitudeText.Location = new System.Drawing.Point(104, 85);
+            this.latitudeText.Location = new System.Drawing.Point(118, 79);
             this.latitudeText.Name = "latitudeText";
             this.latitudeText.ReadOnly = true;
-            this.latitudeText.Size = new System.Drawing.Size(100, 20);
+            this.latitudeText.Size = new System.Drawing.Size(100, 21);
             this.latitudeText.TabIndex = 13;
             //
             // longitudeText
             //
-            this.longitudeText.Location = new System.Drawing.Point(104, 111);
+            this.longitudeText.Location = new System.Drawing.Point(118, 103);
             this.longitudeText.Name = "longitudeText";
             this.longitudeText.ReadOnly = true;
-            this.longitudeText.Size = new System.Drawing.Size(100, 20);
+            this.longitudeText.Size = new System.Drawing.Size(100, 21);
             this.longitudeText.TabIndex = 14;
             //
             // razzmodeCb
@@ -212,16 +206,16 @@
             this.razzmodeCb.Items.AddRange(new object[] {
             "probability",
             "cp"});
-            this.razzmodeCb.Location = new System.Drawing.Point(104, 137);
+            this.razzmodeCb.Location = new System.Drawing.Point(118, 127);
             this.razzmodeCb.Name = "razzmodeCb";
-            this.razzmodeCb.Size = new System.Drawing.Size(100, 21);
+            this.razzmodeCb.Size = new System.Drawing.Size(100, 20);
             this.razzmodeCb.TabIndex = 15;
             //
             // razzSettingText
             //
-            this.razzSettingText.Location = new System.Drawing.Point(104, 164);
+            this.razzSettingText.Location = new System.Drawing.Point(118, 152);
             this.razzSettingText.Name = "razzSettingText";
-            this.razzSettingText.Size = new System.Drawing.Size(100, 20);
+            this.razzSettingText.Size = new System.Drawing.Size(100, 21);
             this.razzSettingText.TabIndex = 16;
             //
             // transferTypeCb
@@ -235,24 +229,24 @@
             "Duplicate",
             "IV Duplicate",
             "All"});
-            this.transferTypeCb.Location = new System.Drawing.Point(104, 190);
+            this.transferTypeCb.Location = new System.Drawing.Point(118, 176);
             this.transferTypeCb.Name = "transferTypeCb";
-            this.transferTypeCb.Size = new System.Drawing.Size(100, 21);
+            this.transferTypeCb.Size = new System.Drawing.Size(100, 20);
             this.transferTypeCb.TabIndex = 17;
             this.transferTypeCb.SelectedIndexChanged += new System.EventHandler(this.transferTypeCb_SelectedIndexChanged);
             //
             // transferCpThresText
             //
-            this.transferCpThresText.Location = new System.Drawing.Point(104, 220);
+            this.transferCpThresText.Location = new System.Drawing.Point(118, 202);
             this.transferCpThresText.Name = "transferCpThresText";
-            this.transferCpThresText.Size = new System.Drawing.Size(100, 20);
+            this.transferCpThresText.Size = new System.Drawing.Size(100, 21);
             this.transferCpThresText.TabIndex = 18;
             this.transferCpThresText.TextChanged += new System.EventHandler(this.transferCpThresText_TextChanged);
             //
             // evolveAllChk
             //
             this.evolveAllChk.AutoSize = true;
-            this.evolveAllChk.Location = new System.Drawing.Point(104, 321);
+            this.evolveAllChk.Location = new System.Drawing.Point(118, 296);
             this.evolveAllChk.Name = "evolveAllChk";
             this.evolveAllChk.Size = new System.Drawing.Size(15, 14);
             this.evolveAllChk.TabIndex = 19;
@@ -263,9 +257,9 @@
             //
             this.saveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.saveBtn.Location = new System.Drawing.Point(0, 341);
+            this.saveBtn.Location = new System.Drawing.Point(0, 315);
             this.saveBtn.Name = "saveBtn";
-            this.saveBtn.Size = new System.Drawing.Size(198, 95);
+            this.saveBtn.Size = new System.Drawing.Size(218, 88);
             this.saveBtn.TabIndex = 20;
             this.saveBtn.Text = "Save";
             this.saveBtn.UseVisualStyleBackColor = true;
@@ -280,7 +274,7 @@
             this.gMapControl1.GrayScaleMode = false;
             this.gMapControl1.HelperLineOption = GMap.NET.WindowsForms.HelperLineOptions.DontShow;
             this.gMapControl1.LevelsKeepInMemmory = 5;
-            this.gMapControl1.Location = new System.Drawing.Point(3, 16);
+            this.gMapControl1.Location = new System.Drawing.Point(18, 15);
             this.gMapControl1.MarkersEnabled = true;
             this.gMapControl1.MaxZoom = 2;
             this.gMapControl1.MinZoom = 2;
@@ -293,7 +287,7 @@
             this.gMapControl1.ScaleMode = GMap.NET.WindowsForms.ScaleModes.Integer;
             this.gMapControl1.SelectedAreaFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(65)))), ((int)(((byte)(105)))), ((int)(((byte)(225)))));
             this.gMapControl1.ShowTileGridLines = false;
-            this.gMapControl1.Size = new System.Drawing.Size(468, 388);
+            this.gMapControl1.Size = new System.Drawing.Size(468, 358);
             this.gMapControl1.TabIndex = 22;
             this.gMapControl1.Zoom = 0D;
             this.gMapControl1.Load += new System.EventHandler(this.gMapControl1_Load);
@@ -306,9 +300,9 @@
             this.groupBox1.Controls.Add(this.trackBar);
             this.groupBox1.Controls.Add(this.gMapControl1);
             this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.groupBox1.Location = new System.Drawing.Point(221, 9);
+            this.groupBox1.Location = new System.Drawing.Point(233, 8);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(474, 442);
+            this.groupBox1.Size = new System.Drawing.Size(480, 408);
             this.groupBox1.TabIndex = 25;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "Location";
@@ -317,9 +311,9 @@
             //
             this.FindAdressButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.FindAdressButton.Location = new System.Drawing.Point(338, 410);
+            this.FindAdressButton.Location = new System.Drawing.Point(355, 379);
             this.FindAdressButton.Name = "FindAdressButton";
-            this.FindAdressButton.Size = new System.Drawing.Size(130, 26);
+            this.FindAdressButton.Size = new System.Drawing.Size(119, 24);
             this.FindAdressButton.TabIndex = 25;
             this.FindAdressButton.Text = "Find Location";
             this.FindAdressButton.UseVisualStyleBackColor = true;
@@ -327,41 +321,35 @@
             //
             // AdressBox
             //
-            this.AdressBox.Location = new System.Drawing.Point(6, 416);
+            this.AdressBox.Location = new System.Drawing.Point(18, 379);
             this.AdressBox.Name = "AdressBox";
-            this.AdressBox.Size = new System.Drawing.Size(326, 20);
+            this.AdressBox.Size = new System.Drawing.Size(331, 21);
             this.AdressBox.TabIndex = 25;
             //
             // trackBar
             //
             this.trackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.trackBar.BackColor = System.Drawing.SystemColors.Info;
-            this.trackBar.Location = new System.Drawing.Point(426, 16);
+            this.trackBar.Location = new System.Drawing.Point(432, 15);
             this.trackBar.Name = "trackBar";
             this.trackBar.Orientation = System.Windows.Forms.Orientation.Vertical;
-            this.trackBar.Size = new System.Drawing.Size(45, 104);
+            this.trackBar.Size = new System.Drawing.Size(45, 96);
             this.trackBar.TabIndex = 25;
             this.trackBar.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
             this.trackBar.Scroll += new System.EventHandler(this.trackBar_Scroll);
             //
             // panel1
             //
-            this.panel1.Controls.Add(this.label7);
-            this.panel1.Controls.Add(this.ImageSizeBox);
-            this.panel1.Controls.Add(this.EmailLoginText);
+            this.panel1.Controls.Add(this.TravelSpeedBox);
             this.panel1.Controls.Add(this.CatchPokemonBox);
-            this.panel1.Controls.Add(this.EmailPasswordText);
             this.panel1.Controls.Add(this.CatchPokemonText);
-            this.panel1.Controls.Add(this.EmailPasswordBox);
-            this.panel1.Controls.Add(this.EmailLoginBox);
             this.panel1.Controls.Add(this.transferIVThresText);
             this.panel1.Controls.Add(this.TravelSpeedText);
-            this.panel1.Controls.Add(this.TravelSpeedBox);
             this.panel1.Controls.Add(this.label6);
             this.panel1.Controls.Add(this.authTypeLabel);
             this.panel1.Controls.Add(this.authTypeCb);
-            this.panel1.Controls.Add(this.ptcUserLabel);
-            this.panel1.Controls.Add(this.ptcPasswordLabel);
+            this.panel1.Controls.Add(this.UserLabel);
+            this.panel1.Controls.Add(this.PasswordLabel);
             this.panel1.Controls.Add(this.saveBtn);
             this.panel1.Controls.Add(this.latLabel);
             this.panel1.Controls.Add(this.evolveAllChk);
@@ -377,19 +365,27 @@
             this.panel1.Controls.Add(this.longitudeText);
             this.panel1.Controls.Add(this.label5);
             this.panel1.Controls.Add(this.latitudeText);
-            this.panel1.Controls.Add(this.ptcUserText);
-            this.panel1.Controls.Add(this.ptcPassText);
+            this.panel1.Controls.Add(this.UserLoginBox);
+            this.panel1.Controls.Add(this.UserPasswordBox);
             this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
-            this.panel1.Location = new System.Drawing.Point(9, 9);
+            this.panel1.Location = new System.Drawing.Point(9, 8);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(212, 442);
+            this.panel1.Size = new System.Drawing.Size(224, 408);
             this.panel1.TabIndex = 26;
             this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
             //
+            // TravelSpeedBox
+            //
+            this.TravelSpeedBox.Location = new System.Drawing.Point(118, 251);
+            this.TravelSpeedBox.Name = "TravelSpeedBox";
+            this.TravelSpeedBox.Size = new System.Drawing.Size(100, 21);
+            this.TravelSpeedBox.TabIndex = 22;
+            this.TravelSpeedBox.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
+            //
             // CatchPokemonBox
             //
             this.CatchPokemonBox.AutoSize = true;
-            this.CatchPokemonBox.Location = new System.Drawing.Point(104, 298);
+            this.CatchPokemonBox.Location = new System.Drawing.Point(118, 275);
             this.CatchPokemonBox.Name = "CatchPokemonBox";
             this.CatchPokemonBox.Size = new System.Drawing.Size(15, 14);
             this.CatchPokemonBox.TabIndex = 26;
@@ -399,107 +395,51 @@
             // CatchPokemonText
             //
             this.CatchPokemonText.AutoSize = true;
-            this.CatchPokemonText.Location = new System.Drawing.Point(3, 298);
+            this.CatchPokemonText.Location = new System.Drawing.Point(3, 275);
             this.CatchPokemonText.Name = "CatchPokemonText";
-            this.CatchPokemonText.Size = new System.Drawing.Size(86, 13);
+            this.CatchPokemonText.Size = new System.Drawing.Size(89, 12);
             this.CatchPokemonText.TabIndex = 25;
             this.CatchPokemonText.Text = "Catch Pokemon:";
             this.CatchPokemonText.Click += new System.EventHandler(this.label7_Click);
             //
             // transferIVThresText
             //
-            this.transferIVThresText.Location = new System.Drawing.Point(104, 220);
+            this.transferIVThresText.Location = new System.Drawing.Point(118, 203);
             this.transferIVThresText.Name = "transferIVThresText";
-            this.transferIVThresText.Size = new System.Drawing.Size(100, 20);
+            this.transferIVThresText.Size = new System.Drawing.Size(100, 21);
             this.transferIVThresText.TabIndex = 24;
             this.transferIVThresText.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
             //
             // TravelSpeedText
             //
             this.TravelSpeedText.AutoSize = true;
-            this.TravelSpeedText.Location = new System.Drawing.Point(3, 275);
+            this.TravelSpeedText.Location = new System.Drawing.Point(3, 254);
             this.TravelSpeedText.Name = "TravelSpeedText";
-            this.TravelSpeedText.Size = new System.Drawing.Size(102, 13);
+            this.TravelSpeedText.Size = new System.Drawing.Size(113, 12);
             this.TravelSpeedText.TabIndex = 23;
             this.TravelSpeedText.Text = "Travel Speed km/h:";
             //
-            // TravelSpeedBox
-            //
-            this.TravelSpeedBox.Location = new System.Drawing.Point(104, 272);
-            this.TravelSpeedBox.Name = "TravelSpeedBox";
-            this.TravelSpeedBox.Size = new System.Drawing.Size(100, 20);
-            this.TravelSpeedBox.TabIndex = 22;
-            this.TravelSpeedBox.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
-            //
             // label6
             //
             this.label6.AutoSize = true;
-            this.label6.Location = new System.Drawing.Point(3, 220);
+            this.label6.Location = new System.Drawing.Point(3, 203);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(70, 13);
+            this.label6.Size = new System.Drawing.Size(83, 12);
             this.label6.TabIndex = 21;
             this.label6.Text = "IV Threshold:";
             this.label6.Click += new System.EventHandler(this.label6_Click);
             //
-            // EmailLoginText
-            //
-            this.EmailLoginText.AutoSize = true;
-            this.EmailLoginText.Location = new System.Drawing.Point(3, 36);
-            this.EmailLoginText.Name = "EmailLoginText";
-            this.EmailLoginText.Size = new System.Drawing.Size(35, 13);
-            this.EmailLoginText.TabIndex = 27;
-            this.EmailLoginText.Text = "Email:";
-            //
-            // EmailPasswordText
-            //
-            this.EmailPasswordText.AutoSize = true;
-            this.EmailPasswordText.Location = new System.Drawing.Point(3, 62);
-            this.EmailPasswordText.Name = "EmailPasswordText";
-            this.EmailPasswordText.Size = new System.Drawing.Size(56, 13);
-            this.EmailPasswordText.TabIndex = 28;
-            this.EmailPasswordText.Text = "Password:";
-            //
-            // EmailLoginBox
-            //
-            this.EmailLoginBox.Location = new System.Drawing.Point(68, 33);
-            this.EmailLoginBox.Name = "EmailLoginBox";
-            this.EmailLoginBox.Size = new System.Drawing.Size(136, 20);
-            this.EmailLoginBox.TabIndex = 29;
-            //
-            // EmailPasswordBox
-            //
-            this.EmailPasswordBox.Location = new System.Drawing.Point(68, 62);
-            this.EmailPasswordBox.Name = "EmailPasswordBox";
-            this.EmailPasswordBox.Size = new System.Drawing.Size(136, 20);
-            this.EmailPasswordBox.TabIndex = 30;
-            //
-            // label7
-            //
-            this.label7.AutoSize = true;
-            this.label7.Location = new System.Drawing.Point(3, 249);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(100, 13);
-            this.label7.TabIndex = 32;
-            this.label7.Text = "PokeUi Image Size:";
-            //
-            // ImageSizeBox
-            //
-            this.ImageSizeBox.Location = new System.Drawing.Point(104, 246);
-            this.ImageSizeBox.Name = "ImageSizeBox";
-            this.ImageSizeBox.Size = new System.Drawing.Size(100, 20);
-            this.ImageSizeBox.TabIndex = 31;
-            //
             // SettingsForm
             //
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(704, 460);
+            this.ClientSize = new System.Drawing.Size(722, 424);
             this.Controls.Add(this.groupBox1);
             this.Controls.Add(this.panel1);
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
-            this.MinimumSize = new System.Drawing.Size(630, 360);
+            this.MinimumSize = new System.Drawing.Size(630, 334);
             this.Name = "SettingsForm";
-            this.Padding = new System.Windows.Forms.Padding(9);
+            this.Padding = new System.Windows.Forms.Padding(9, 8, 9, 8);
             this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
             this.Text = "Settings";
@@ -517,8 +457,8 @@

         private System.Windows.Forms.Label authTypeLabel;
         private System.Windows.Forms.ComboBox authTypeCb;
-        private System.Windows.Forms.Label ptcUserLabel;
-        private System.Windows.Forms.Label ptcPasswordLabel;
+        private System.Windows.Forms.Label UserLabel;
+        private System.Windows.Forms.Label PasswordLabel;
         private System.Windows.Forms.Label latLabel;
         private System.Windows.Forms.Label longiLabel;
         private System.Windows.Forms.Label label1;
@@ -526,8 +466,8 @@
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Label label4;
         private System.Windows.Forms.Label label5;
-        private System.Windows.Forms.TextBox ptcUserText;
-        private System.Windows.Forms.TextBox ptcPassText;
+        private System.Windows.Forms.TextBox UserLoginBox;
+        private System.Windows.Forms.TextBox UserPasswordBox;
         private System.Windows.Forms.TextBox latitudeText;
         private System.Windows.Forms.TextBox longitudeText;
         private System.Windows.Forms.ComboBox razzmodeCb;
@@ -549,11 +489,5 @@
         private System.Windows.Forms.Button FindAdressButton;
         private System.Windows.Forms.CheckBox CatchPokemonBox;
         private System.Windows.Forms.Label CatchPokemonText;
-        private System.Windows.Forms.Label EmailLoginText;
-        private System.Windows.Forms.Label EmailPasswordText;
-        private System.Windows.Forms.TextBox EmailLoginBox;
-        private System.Windows.Forms.TextBox EmailPasswordBox;
-        private System.Windows.Forms.Label label7;
-        private System.Windows.Forms.TextBox ImageSizeBox;
     }
 }
diff --git a/PokemonGo/RocketAPI/Window/SettingsForm.cs b/PokemonGo/RocketAPI/Window/SettingsForm.cs
index 808d322..d95de7c 100644
--- a/PokemonGo/RocketAPI/Window/SettingsForm.cs
+++ b/PokemonGo/RocketAPI/Window/SettingsForm.cs
@@ -24,10 +24,15 @@ namespace PokemonGo.RocketAPI.Window
         {

             authTypeCb.Text = Settings.Instance.AuthType.ToString();
-            ptcUserText.Text = Settings.Instance.PtcUsername.ToString();
-            ptcPassText.Text = Settings.Instance.PtcPassword.ToString();
-            EmailLoginBox.Text = Settings.Instance.Email.ToString();
-            EmailPasswordBox.Text = Settings.Instance.Password.ToString();
+            if (authTypeCb.Text == "google")
+            {
+                UserLoginBox.Text = Settings.Instance.Email.ToString();
+                UserPasswordBox.Text = Settings.Instance.Password.ToString();
+            } else
+            {
+                UserLoginBox.Text = Settings.Instance.PtcUsername.ToString();
+                UserPasswordBox.Text = Settings.Instance.PtcPassword.ToString();
+            }
             latitudeText.Text = Settings.Instance.DefaultLatitude.ToString();
             longitudeText.Text = Settings.Instance.DefaultLongitude.ToString();
             razzmodeCb.Text = Settings.Instance.RazzBerryMode;
@@ -38,7 +43,7 @@ namespace PokemonGo.RocketAPI.Window
             evolveAllChk.Checked = Settings.Instance.EvolveAllGivenPokemons;
             CatchPokemonBox.Checked = Settings.Instance.CatchPokemon;
             TravelSpeedBox.Text = Settings.Instance.TravelSpeed.ToString();
-            ImageSizeBox.Text = Settings.Instance.ImageSize.ToString();
+           // ImageSizeBox.Text = Settings.Instance.ImageSize.ToString();
             // Initialize map:
             //use google provider
             gMapControl1.MapProvider = GoogleMapProvider.Instance;
@@ -70,10 +75,15 @@ namespace PokemonGo.RocketAPI.Window
         private void saveBtn_Click(object sender, EventArgs e)
         {
             Settings.Instance.SetSetting(authTypeCb.Text, "AuthType");
-            Settings.Instance.SetSetting(EmailLoginBox.Text, "Email");
-            Settings.Instance.SetSetting(EmailPasswordBox.Text, "Password");
-            Settings.Instance.SetSetting(ptcUserText.Text, "PtcUsername");
-            Settings.Instance.SetSetting(ptcPassText.Text, "PtcPassword");
+            if (authTypeCb.Text == "google")
+            {
+                Settings.Instance.SetSetting(UserLoginBox.Text, "Email");
+                Settings.Instance.SetSetting(UserPasswordBox.Text, "Password");
+            } else
+            {
+                Settings.Instance.SetSetting(UserLoginBox.Text, "PtcUsername");
+                Settings.Instance.SetSetting(UserPasswordBox.Text, "PtcPassword");
+            }
             Settings.Instance.SetSetting(latitudeText.Text.Replace(',', '.'), "DefaultLatitude");
             Settings.Instance.SetSetting(longitudeText.Text.Replace(',', '.'), "DefaultLongitude");

@@ -89,10 +99,11 @@ namespace PokemonGo.RocketAPI.Window
             Settings.Instance.SetSetting(transferCpThresText.Text, "TransferCPThreshold");
             Settings.Instance.SetSetting(transferIVThresText.Text, "TransferIVThreshold");
             Settings.Instance.SetSetting(TravelSpeedBox.Text, "TravelSpeed");
-            Settings.Instance.SetSetting(ImageSizeBox.Text, "ImageSize");
+            //Settings.Instance.SetSetting(ImageSizeBox.Text, "ImageSize");
             Settings.Instance.SetSetting(evolveAllChk.Checked ? "true" : "false", "EvolveAllGivenPokemons");
             Settings.Instance.SetSetting(CatchPokemonBox.Checked ? "true" : "false", "CatchPokemon");
             Settings.Instance.Reload();
+
             Close();
         }

@@ -100,25 +111,11 @@ namespace PokemonGo.RocketAPI.Window
         {
             if (authTypeCb.Text == "google")
             {
-                EmailLoginBox.Visible = true;
-                EmailLoginText.Visible = true;
-                EmailPasswordBox.Visible = true;
-                EmailPasswordText.Visible = true;
-                ptcUserText.Visible = false;
-                ptcPassText.Visible = false;
-                ptcUserLabel.Visible = false;
-                ptcPasswordLabel.Visible = false;
+                UserLabel.Text = "Email:";
             }
             else
             {
-                EmailLoginBox.Visible = false;
-                EmailLoginText.Visible = false;
-                EmailPasswordBox.Visible = false;
-                EmailPasswordText.Visible = false;
-                ptcUserText.Visible = true;
-                ptcPassText.Visible = true;
-                ptcUserLabel.Visible = true;
-                ptcPasswordLabel.Visible = true;
+                UserLabel.Text = "Username:";
             }
         }

@@ -245,4 +242,4 @@ namespace PokemonGo.RocketAPI.Window

         }
     }
-}
+}
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/Window/packages.config b/PokemonGo/RocketAPI/Window/packages.config
new file mode 100644
index 0000000..7d8915d
--- /dev/null
+++ b/PokemonGo/RocketAPI/Window/packages.config
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="ObjectListView.Official" version="2.9.1" targetFramework="net45" />
+  <package id="S2Geometry" version="1.0.3" targetFramework="net45" />
+</packages>
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/packages.config b/PokemonGo/RocketAPI/packages.config
index e4d1dce..87ca41a 100644
--- a/PokemonGo/RocketAPI/packages.config
+++ b/PokemonGo/RocketAPI/packages.config
@@ -7,6 +7,6 @@
   <package id="Google.Protobuf.Tools" version="3.0.0-beta3" targetFramework="net45" />
   <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
   <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
-  <package id="S2Geometry" version="1.0.1" targetFramework="net45" />
+  <package id="S2Geometry" version="1.0.3" targetFramework="net45" />
   <package id="VarintBitConverter" version="1.0.0.0" targetFramework="net45" />
 </packages>
\ No newline at end of file
You may download the files in Public Git.