The logic inside of this case statement is pretty deep and has a lot of nested conditionals. Was this done over splitting parts out into methods for performance reasons?