Refactor reload_settings
Refactor imports
Fix killall
Move infinite loop to main()
Clean up constants