public void expand(BibtexFile bibtexFile) throws ExpansionException {
		HashMap stringKey2StringValue = new HashMap();
		for (Iterator entryIt = bibtexFile.getEntries().iterator(); entryIt.hasNext();) {
			BibtexAbstractEntry abstractEntry = (BibtexAbstractEntry) entryIt.next();
			if (abstractEntry instanceof BibtexMacroDefinition) {
				BibtexMacroDefinition bibtexStringDefinition = (BibtexMacroDefinition) abstractEntry;
				BibtexAbstractValue simplifiedValue =
					simplify(bibtexFile, bibtexStringDefinition.getValue(), stringKey2StringValue);
				bibtexStringDefinition.setValue(simplifiedValue);
				if (removeMacros) {
					bibtexFile.removeEntry(bibtexStringDefinition);
				};
				stringKey2StringValue.put(bibtexStringDefinition.getKey().toLowerCase(), simplifiedValue);

			} else if (abstractEntry instanceof BibtexPreamble) {
				BibtexPreamble preamble = (BibtexPreamble) abstractEntry;
				preamble.setContent(simplify(bibtexFile, preamble.getContent(), stringKey2StringValue));
			} else if (abstractEntry instanceof BibtexEntry) {
				BibtexEntry entry = (BibtexEntry) abstractEntry;
				for (Iterator fieldIt = entry.getFields().entrySet().iterator(); fieldIt.hasNext();) {
					Map.Entry field = (Map.Entry) fieldIt.next();
					if (!(field.getValue() instanceof BibtexString)) {
						entry.setField(
							(String) field.getKey(),
							simplify(bibtexFile, (BibtexAbstractValue) field.getValue(), stringKey2StringValue));
					}
				}
			} else if (abstractEntry instanceof BibtexToplevelComment) {
				// don't do anything here ...
			} else {
				throwExpansionException(
					"MacroReferenceExpander.expand(): I don't support \""
						+ abstractEntry.getClass().getName()
						+ "\". Use the force, read the source!");
			}
		}
		finishExpansion();
	}