Move restart to core and tweak it