Apply singleton pattern to Input class