public void populateChapters(String chaptersList){
		StringTokenizer breakChapters = new StringTokenizer(chaptersList, "%");
		String currentChapter = "";
		String currentSubChapters = "";
		int start;
		int end;
		int mainChapter = 1;
		while(breakChapters.hasMoreTokens()){
			//Parse the main chapter part.
			currentChapter = breakChapters.nextToken();
			StringTokenizer breakSubChapters = new StringTokenizer(currentChapter, "~");
			currentChapter = breakSubChapters.nextToken();
			Scanner currentChap = new Scanner(currentChapter);
			currentChapter = currentChap.nextLine();//Clears out the blank line left from the tokenizer.
			currentChapter = currentChap.nextLine();
			Scanner st = new Scanner(currentChap.nextLine());
			start = st.nextInt();
			Scanner en = new Scanner(currentChap.nextLine());
			end = en.nextInt();
			//Check if there are subchapters, if so parse those in.
			if(breakSubChapters.hasMoreTokens()){
				currentSubChapters = breakSubChapters.nextToken();
				Scanner currSub = new Scanner(currentSubChapters);
				currSub.nextLine(); //Clears out the blank line left behind by splicing on the %.
				currentSubChapters = ""; //Rebuild the subchapter string.
				while(currSub.hasNext()){
					currentSubChapters += currSub.nextLine()+"\n";
				}
				chapters.add(new Chapter(currentChapter, start, end, mainChapter, currentSubChapters));
				mainChapter++;
				currSub.close();
			}
			else {
				chapters.add(new Chapter(currentChapter, start, end, mainChapter));
				mainChapter++;
			}
			currentChap.close();
			st.close();
			en.close();
		}
	}