Grouping of saved statefiles

That should be a fairly simple fix, do not hesitate to contribute if you can or see this: