private boolean checkInput(String input) {
		try {
			input = input.toLowerCase();
			input = input.replace("$", "");
			input = input.trim();
			
			// Get the command, then strip it from the other data
			String command = input.substring(0,1);
			input = input.replaceFirst(command, "");
			input = input.trim();

			if (command.equals("r")) { // Restock
				restock();
			}
			if (command.equals("q")) { // Quit
				return false;
			}
			if (command.equals("w")) { // Withdraw
				withdraw(Integer.parseInt(input));
				System.out.println("Machine balance:");
				status();
			}
			if (command.equals("i")) { // Display denomination(s)
				String[] denomsString = input.split("\\s+");
				Integer[] denomsInt = new Integer[denomsString.length];

				for (int i = 0; i < denomsString.length; i++) {
					denomsInt[i] = Integer.parseInt(denomsString[i]);
					System.out.println(cashMachine.status(denomsInt[i]));
				}
			}
		} catch (NumberFormatException e) {
			System.out.println("Failure: Invalid Command");
		} catch (Exception e) {
			System.out.println("Failure: Invalid Command");
		}
		return true;
	}