Fixed a mistake in handling multiple entries. Time for some structure.