private void loadZones(final String filename) {
		final int ID = 0; // id number for the zone
		final int NAME = 1; // name of the zone on it's own line
		final int PARENT = 2; // reference to a parent zone, on it's own line
		final int ERROR = 3; // error state, a third line that isn't "~"

		int step = 0;

		// input data storage
		int id = -1;
		String name = null;
		Zone parent = null;

		Zone temp = null; // temporary reference for the zone objects we're creating.

		final String[] data = Utils.loadStrings(filename); // file data

		// for each line in the file.
		for (final String str : data) {
			debug("LINE: " + Utils.padRight(str, ' ', 40) + "(STEP: " + step + ")");

			if (str.charAt(0) == '#') {
				continue;
			}
			else if (str.charAt(0) == '~') {
				temp = new Zone(name, parent);
				temp.setId(id);
				zones.put(temp, 0);

				debug("New Zone");
				debug(temp.getId() + " = " + temp.getName());

				id = -1;
				name = null;
				parent = null;

				temp = null;

				step = ID;
				continue;
			} 
			else {
				switch (step) {
				case ID:
					id = Utils.toInt(str, -1);
					step = NAME;
					break;
				case NAME:
					name = str;
					setNameRef(name.toLowerCase(), id);
					debug("$" + name.toLowerCase() + " -> " + getNameRef(name.toLowerCase()));
					step = PARENT;
					break;
				case PARENT:
					if (!str.equals("$NULL")) {
						parent = getZone(getNameRef(str.substring(1)));
					}
					step = ERROR;
					break;
				case ERROR:
					System.out.println("ERROR! Zone Loading aborted!");
					return;
				default:
					break;
				}
			}
		}


		// System.out.println( getNameReferences() );
		// System.out.println( zones.keySet() );
	}