Polishing, added save and restore and settings.