Can we break the cases out into separate methods and call them here? This method is big-ish and certainly would be difficult to test.