R# tells me that a var is never assigned to.
I'm thinking, "if that's the case, just get rid of it - remove the declaration." But R#'s suggestions are different and varied:
Which knob should I turn, or should I just remain flatfooted and palely loitering?
Note: I didn't design or write this code, so I don't know what the intent is; there are some very strange Rube Goldbergesque "doings" amidst it all; to mix metaphors, I'm afraid of drawing a digit from the dyke or appending the straw that fractures the spine of the dromedary.