
Required changing some local variable names to prevent the same `view` variable being declared multiple times. Otherwise it should be a verbatim change from if statements to switch statements.
Required changing some local variable names to prevent the same `view` variable being declared multiple times. Otherwise it should be a verbatim change from if statements to switch statements.