public static void main(String[] args) {
		machines = null;
		singleMachine = null;
		dispensers = null;
		singleDispenser = null;
		foodItem = null;
		container = openSave();
		
		machines = container.getMachines();
	//	Thread shutdown = new Thread();
	//	shutdown.
	//	Runtime.getRuntime().addShutdownHook(new Thread());
		
		System.out.print("Would you like to run the GUI (gui) or the Demo (demo)?: ");
		boolean gui = true;
		if (new Scanner(System.in).nextLine().equalsIgnoreCase("demo")) {
			gui = false;
		}
		
		System.out.println("Welcome to the Vending Machines!");
		
		for (int i = 0; i < machines.size(); i++) {
			machines.get(i).start();
		//	machines.get(i).writeContents();
		//	System.out.println("Machine " + (i + 1) + ") " + machines.get(i).summary());
		}
		
		if (!gui) {
			
			for (int i = 0; i < machines.size(); i++) {
				//machines.get(i).writeContents();
				System.out.println("Machine " + (i + 1) + ") " + machines.get(i).summary());
			}
			
			int customerCount = 0;
			while (customerCount < 10000) {
				if (new Random().nextInt(100) > 30){
				Customer temp = new Customer(customerCount, countSave, container);
			//	if (new Random().nextInt(100) > 30){
				String returned = temp.runCommand();
				while (returned.equalsIgnoreCase("continue")) {
					returned = temp.runCommand();
				}
				System.out.println("Customer " + customerCount +": " + returned);
				customerCount++;
				} else {
					//Do nothing
					System.currentTimeMillis();
				}
			}
			
			for (int i = 0; i < machines.size(); i++) {
				machines.get(i).writeContents();
				System.out.println("Machine " + (i + 1) + ") " + machines.get(i).summary());
			}
			try {
				ObjectOutputStream oOS = new ObjectOutputStream(new FileOutputStream("run" + countSave + "/container.dat"));
				oOS.writeObject(container);
				oOS.flush();
				oOS.close();
			} catch (IOException e) {
				System.err.println("Unable to write file");
			}
			System.exit(0);
		}

		
		JFrame frame = new JFrame("Test Frame");
		frame.setSize(700, 700);
		frame.setLocationRelativeTo(null);
		frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
		Driver button = new Driver();  // Initialize the component.
		frame.getContentPane().add(button);      // Place the component on the application
		
		frame.setVisible(true);
	}