private final BaseBlock loadBaseBlock(Element element) {
		// List of IO names.
		// TODO: currently not used!
		ArrayList<String> inList = new ArrayList<>();
		ArrayList<String> outList = new ArrayList<>();

		NodeList nodes = element.getChildNodes();
		for (int i = 0; i < nodes.getLength(); i++) {
			Node node = nodes.item(i);

			if (node instanceof Element) {
				Element child = (Element) node;

				String IOName = child.getAttribute("name");
				String IOType = child.getNodeName();

				if (IOType.equals("in")) {
					inList.add(IOName);
				} else if (IOType.equals("out")) {
					outList.add(IOName);
				}
			}
		}

		String baseBlockType = element.getAttribute("type");
		String baseBlockUUID = element.getAttribute("uuid");

		BaseBlock ret = null;

		// Create BaseBlock according to 'type' in XML
		switch (baseBlockType) {
		case "and":
			ret = new AND(baseBlockUUID, inList.size());
			break;
		case "or":
			ret = new OR(baseBlockUUID, inList.size());
			break;
		case "nand":
			ret = new NAND(baseBlockUUID, inList.size());
			break;
		case "nor":
			ret = new NOR(baseBlockUUID, inList.size());
			break;
		case "not":
			ret = new NOT(baseBlockUUID);
			break;
		default:
			assert false;
			break;
		}

		return ret;
	}