Break out nested cases into single function