changed how settings are stored in order to fix an error with the refresh method. I think it works better in general this way. Also added a debug method for dev purposes, but leaving it in for now because I think it might be useful. Can be convinced otherwise