implement save settings

and some fixes