public static Molecule createMolecule(String input) {
		// For now, only consider ane.
		if(!input.endsWith("ane")) {
			System.out.println("Only alkanes are currently supported.");
			return null;
		}
		
		input = input.substring(0, input.length() - 3);
		int primaryLength = 1;
		for(primaryLength = 1; primaryLength <= PREFIX.length; primaryLength++)
			if(input.endsWith(PREFIX[primaryLength - 1])) break;
		
		input = input.substring(0, input.length() - PREFIX[primaryLength - 1].length());
		
		System.out.println(primaryLength);
		Molecule mol = new Molecule(primaryLength);
		
		if(input.length() == 0) return mol;
		
		String[] parts = input.split("-");
		for(int x = 0; x < parts.length; x+= 2) {
			List<Integer> positions = new ArrayList<Integer>();
			String[] intParts = parts[x].split(",");
			for(String s : intParts)
				positions.add(Integer.parseInt(s));
			
			parts[x + 1] = parts[x + 1].substring(0, parts[x + 1].length() - 2);

			int branchLength = 1;
			for(branchLength = 1; branchLength <= PREFIX.length; branchLength++)
				if(parts[x + 1].endsWith(PREFIX[branchLength - 1])) break;
			
			System.out.println("Adding a branch of length " + branchLength + " at position " + positions);
			
			
			for(int pos : positions) {
				Molecule subsidiary = new Molecule(branchLength);
				mol.add(pos - 1, subsidiary, 0);
			}
		}
		
		return mol;
	}