Save / restore system

- created a functional save/restore system