Inputstate: Move variable declarations to smaller scope