some renaming and simplifying
Rework the onInputEntered callback to be cleaner