Feature/graceful quit

Quits nicely.