Additional refactoring drying up code for reading user inputs