Please try to rewrite with less if else and with such deep scopes.
follow 
if (wrong)
{
  return;
}

if (good)
{
  doSomething();
  return;
}

things like

void func()
{
if (wrong)
{
  return
}
else
{
   if(somthing)
   {
   }
   else
   {
   }
}
}
are not readable.