[Rem-2564] Changed declaration of variables to be compatable with different Ubuntu version
Description
Strangely, in my Ubuntu 22 VM declaring variables in a switch statement case worked fine. That is not the case in older versions of Ubuntu, and I'm actually surprised it worked at all in my Ubuntu 22 VM. Changing it to the normal way here.