Overhaul to make this actually useful for saving configs.