Sped up InputState by removing bit shifts.