Add restart feature 

Quoting @Andrew-Tierno: When restarting, the settings are lost, so it only made sense to keep
them as global so they would remain even when restarting.