Switch to STM instead of MVars
Switch to new input handling