Added ContainsKey function to Map.
Redesigned FileFormatFactory, ready for testing.