don't have to restart the editor just click to a tab to go to a different part of the editor & the language change should already have taken effect

for the first screenshot I assume it's because the if queries in the else section are still valid - all the queries are correct hence it is repeating that first.
I don't know what each of the values are doing but personally for me I would have used a single value & checked if value = 0 else if value = 1 else if value = 2 etc - much more flexible than conditions.
as for the second screenshot - I don't really see anything wrong with it - although I would recommend changing conditions/setting values at the beginning - if possible, providing you don't need to run specific actions before changing it.