Changed input controll implementation to be based on an allowed chars map