#27: Further refactoring and minor speedups.
#27: Changed maps to indexedseqs since the maps were being used to keep Int->String with Ints starting from zero and consecutive.