reworked saving and restoring to use existing code as much as possible. add and removing is now working