Improve the constructor of the Input class