Updated Input Handler