Initial implementation of auto-quit.