Reworking input handler