Refactor the code to embed metadata into format files to enable re-use