Introduced new class NestedDict, which represents a nested dictionary
with extra convenience functions for accessing elements
Use a NestedDict for storing data
Refactored the writing and reading of the data to make it more
extensible in the future