Exit process explicit for now in good case. And some small refactoring.