Rework input handling to a stack of states where we're always using the top one instead of going from the bottom one.