Get the whole thing working again with a Map as the core data structure