Merge "Refactor InputConsumer selection logic into a util class" into main