Some refactoring in ExitLocator