Rework persistence into new DefinitionFile class