Rework state in various file formats