singleton is planned final state. Refactoring not done yet. includes and imports were copied from save_network and probably not all of them are needed.