Add option to change popup refresh interval

Also refactored how the default settings are stored/created for better
readability/functionality, plus some minor cleanup