Moved the input logic into its own class.