Code maintenance on getInput function