Add metafile structs and parsing