Improve reading of inputs in console