Implement proper quit command