fixing settings storage
adding tests