Move quitting/restarting into a single module

Less stuff in the core pls kthx