Index: src/mlx/const.py
===================================================================
--- src/mlx/const.py	(revision 782)
+++ src/mlx/const.py	(revision 748)
@@ -11,5 +11,5 @@
 
 ## The version of the program
-VERSION="0.38.1"
+VERSION="0.37.1"
 
 #-------------------------------------------------------------------------------
Index: src/mlx/fs.py
===================================================================
--- src/mlx/fs.py	(revision 765)
+++ src/mlx/fs.py	(revision 666)
@@ -212,6 +212,5 @@
     - n1[]: the N1 values of the turbine engines (array of floats
     of as many items as the number of engines, present only for aircraft with
-    turbines, for other aircraft it is None). If the aircraft has turbines, but
-    the N1 values cannot be read reliably, the array contains Nones.
+    turbines, for other aircraft it is None)
     - rpm[]: the RPM values of the piston engines (array of floats
     of as many items as the number of engines, present only for aircraft with
Index: src/mlx/fsuipc.py
===================================================================
--- src/mlx/fsuipc.py	(revision 780)
+++ src/mlx/fsuipc.py	(revision 749)
@@ -1387,4 +1387,7 @@
         state.gearsDown = data[self._monidx_noseGear]==16383
 
+        if state.gearControlDown!=state.gearsDown:
+            print "gearControl:", data[self._monidx_gearControl], ", noseGear:", data[self._monidx_noseGear]
+
         state.spoilersArmed = data[self._monidx_spoilersArmed]!=0
 
@@ -1846,7 +1849,4 @@
         state.gearsDown = state.gearControlDown
 
-        # Th N1 values cannot be read either
-        state.n1 = [None, None]
-
         return state
 
@@ -1897,6 +1897,5 @@
         return aircraft.type == const.AIRCRAFT_F70 and \
                (airPath.endswith("fokker70_2k4_v4.1.air") or
-                airPath.endswith("fokker70_2k4_v4.3.air") or
-                airPath.lower().endswith("fokker70_fsx_v4.3.air"))
+                airPath.endswith("fokker70_2k4_v4.3.air"))
 
     @property
Index: src/mlx/gui/delaycodes.py
===================================================================
--- src/mlx/gui/delaycodes.py	(revision 768)
+++ src/mlx/gui/delaycodes.py	(revision 555)
@@ -375,6 +375,5 @@
         for column in columns:
             self._treeView.remove_column(column)
-        if self._table is not None:
-            self._eventBox.remove(self._table)
+        self._eventBox.remove(self._table)
         self._table = None
         self.show_all()
Index: src/mlx/gui/flight.py
===================================================================
--- src/mlx/gui/flight.py	(revision 777)
+++ src/mlx/gui/flight.py	(revision 739)
@@ -11,5 +11,5 @@
 import mlx.util as util
 from mlx.pirep import PIREP
-from mlx.i18n import xstr, getLanguage
+from mlx.i18n import xstr
 from mlx.sound import startSound
 import mlx.web as web
@@ -20,6 +20,4 @@
 import tempfile
 import threading
-import re
-import webbrowser
 
 #-----------------------------------------------------------------------------
@@ -63,5 +61,5 @@
 class Page(gtk.Alignment):
     """A page in the flight wizard."""
-    def __init__(self, wizard, id, title, help, completedHelp = None):
+    def __init__(self, wizard, title, help, completedHelp = None):
         """Construct the page."""
         super(Page, self).__init__(xalign = 0.0, yalign = 0.0,
@@ -141,6 +139,4 @@
 
         self._wizard = wizard
-        self._id = id
-        self._nextPageID = None
 
         self._cancelFlightButton = None
@@ -148,19 +144,4 @@
         self._completed = False
         self._fromPage = None
-
-    @property
-    def id(self):
-        """Get the identifier of the page."""
-        return self._id
-
-    @property
-    def nextPageID(self):
-        """Get the identifier of the next page, if set."""
-        return self._nextPageID
-
-    @nextPageID.setter
-    def nextPageID(self, nextPageID):
-        """Set the identifier of the next page."""
-        self._nextPageID = nextPageID
 
     def setMainWidget(self, widget):
@@ -169,6 +150,5 @@
 
     def addButton(self, label, default = False, sensitive = True,
-                  tooltip = None, clicked = None, padding = 4,
-                  clickedArg = None):
+                  tooltip = None, clicked = None, padding = 4):
         """Add a button with the given label.
 
@@ -184,8 +164,5 @@
             button.set_tooltip_text(tooltip)
         if clicked is not None:
-            if clickedArg is None:
-                button.connect("clicked", clicked)
-            else:
-                button.connect("clicked", clicked, clickedArg)
+            button.connect("clicked", clicked)
         return button
 
@@ -300,11 +277,11 @@
     def __init__(self, wizard):
         """Construct the login page."""
-        super(LoginPage, self).__init__(wizard, "login",
-                                        xstr("login"), xstr("loginHelp"))
+        super(LoginPage, self).__init__(wizard, xstr("login"),
+                                        xstr("loginHelp"))
 
         alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
 
-        table = gtk.Table(3, 2)
+        table = gtk.Table(4, 2)
         table.set_row_spacings(4)
         table.set_col_spacings(32)
@@ -344,7 +321,9 @@
         table.attach(self._rememberButton, 1, 2, 2, 3, ypadding = 8)
 
-        self.addButton(xstr("button_login_register"),
-                       clicked = self._registerClicked,
-                       tooltip = xstr("button_login_register_tooltip"))
+        self._entranceExam = gtk.CheckButton(xstr("login_entranceExam"))
+        self._entranceExam.set_use_underline(True)
+        self._entranceExam.set_tooltip_text(xstr("login_entranceExam_tooltip"))
+        self._entranceExam.connect("toggled", self._setControls)
+        table.attach(self._entranceExam, 1, 2, 3, 4, ypadding = 12)
 
         self.addButton(xstr("button_offline"),
@@ -356,4 +335,10 @@
         self._loginButton.set_tooltip_text(xstr("login_button_tooltip"))
 
+
+    @property
+    def entranceExam(self):
+        """Get whether an entrance exam is being performed."""
+        return self._entranceExam.get_active() and \
+               self._pilotID.get_text()!=""
 
     @property
@@ -394,10 +379,10 @@
         pilotID = self._pilotID.get_text()
         password = self._password.get_text()
-        self._rememberButton.set_sensitive(password!="")
-        self._loginButton.set_sensitive(pilotID!="" and password!="")
-
-    def _registerClicked(self, button):
-        """Called when the Register button was clicked."""
-        self._wizard.jumpPage("register")
+        entranceExam = self._entranceExam.get_active()
+        self._password.set_sensitive(not entranceExam)
+        self._rememberButton.set_sensitive(password!="" and not entranceExam)
+        self._entranceExam.set_sensitive(pilotID!="")
+        self._loginButton.set_sensitive(pilotID!="" and
+                                        (password!="" or entranceExam))
 
     def _offlineClicked(self, button):
@@ -411,5 +396,6 @@
         self._wizard.login(self._handleLoginResult,
                            self._pilotID.get_text(),
-                           self._password.get_text())
+                           self._password.get_text(),
+                           self.entranceExam)
 
     def _handleLoginResult(self, returned, result):
@@ -427,8 +413,5 @@
 
             config.save()
-            if result.rank=="STU":
-                self._wizard.jumpPage("student")
-            else:
-                self._wizard.nextPage()
+            self._wizard.nextPage()
 
 #-----------------------------------------------------------------------------
@@ -440,6 +423,5 @@
         help = xstr("flightsel_help")
         completedHelp = xstr("flightsel_chelp")
-        super(FlightSelectionPage, self).__init__(wizard, "flightsel",
-                                                  xstr("flightsel_title"),
+        super(FlightSelectionPage, self).__init__(wizard, xstr("flightsel_title"),
                                                   help, completedHelp = completedHelp)
 
@@ -621,5 +603,5 @@
         """Called when the forward button was clicked."""
         if self._completed:
-            self._wizard.jumpPage(self._nextID, finalize = False)
+            self._wizard.jumpPage(self._nextDistance, finalize = False)
         else:
             self._flightSelected()
@@ -676,30 +658,30 @@
                                          const.PLANE_AWAY)
         else:
-            self._nextID = "connect"
-            self._wizard.jumpPage("connect")
+            self._nextDistance = 2
+            self._wizard.jumpPage(2)
 
     def _fleetRetrieved(self, fleet):
         """Called when the fleet has been retrieved."""
         if fleet is None:
-            self._nextID = "connect"
-            self._wizard.jumpPage("connect")
+            self._nextDistance = 2
+            self._wizard.jumpPage(2)
         else:
             plane = fleet[self._wizard._bookedFlight.tailNumber]
             if plane is None:
-                self._nextID = "connect"
-                self._wizard.jumpPage("connect")
+                self._nextDistance = 2
+                self._wizard.jumpPage(2)
             elif plane.gateNumber is not None and \
                  not fleet.isGateConflicting(plane):
                 self._wizard._departureGate = plane.gateNumber
-                self._nextID = "connect"
-                self._wizard.jumpPage("connect")
+                self._nextDistance = 2
+                self._wizard.jumpPage(2)
             else:
-                self._nextID = "gatesel"
-                self._wizard.jumpPage("gatesel")
+                self._nextDistance = 1
+                self._wizard.nextPage()
 
     def _planeUpdated(self, success):
         """Callback for the plane updating."""
-        self._nextID = "connect"
-        self._wizard.jumpPage("connect")
+        self._nextDistance = 2
+        self._wizard.jumpPage(2)
 
     def _getSaveDialog(self):
@@ -804,6 +786,5 @@
     def __init__(self, wizard):
         """Construct the gate selection page."""
-        super(GateSelectionPage, self).__init__(wizard, "gatesel",
-                                                xstr("gatesel_title"),
+        super(GateSelectionPage, self).__init__(wizard, xstr("gatesel_title"),
                                                 xstr("gatesel_help"))
 
@@ -868,5 +849,5 @@
             self._gateSelected()
         else:
-            self._wizard.jumpPage("connect")
+            self._wizard.nextPage()
 
     def _rowActivated(self, flightList, path, column):
@@ -890,5 +871,5 @@
         """Callback for the plane updating call."""
         if success is None or success:
-            self._wizard.jumpPage("connect")
+            self._wizard.nextPage()
         else:
             dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
@@ -906,673 +887,7 @@
         """Called when the fleet has been retrieved."""
         if fleet is None:
-            self._wizard.jumpPage("connect")
+            self._wizard.nextPage()
         else:
             self.activate()
-
-#-----------------------------------------------------------------------------
-
-class RegisterPage(Page):
-    """A page to enter the registration data."""
-
-    # The minimal year of birth
-    _minYearOfBirth = 1900
-
-    # The maximal year of birth
-    _maxYearOfBirth = datetime.date.today().year
-
-    # The regular expression to check the e-mail address with
-    _emailAddressRE = re.compile("[^@]+@[^@]+\.[^@]+")
-
-    def __init__(self, wizard):
-        """Construct the registration page."""
-        super(RegisterPage, self).__init__(wizard, "register",
-                                           xstr("register_title"),
-                                           xstr("register_help"))
-
-        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
-                                  xscale = 0.0, yscale = 0.0)
-
-        table = gtk.Table(12, 3)
-        table.set_row_spacings(4)
-        table.set_col_spacings(32)
-        alignment.add(table)
-        self.setMainWidget(alignment)
-
-        row = 0
-
-        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
-                                       xscale = 0.0, yscale = 0.0)
-        label = gtk.Label(xstr("register_name1"))
-        label.set_use_underline(True)
-        labelAlignment.add(label)
-        table.attach(labelAlignment, 0, 1, row, row+1)
-
-        self._name1 = gtk.Entry()
-        self._name1.connect("changed", self._updateButtons)
-        self._name1.set_tooltip_text(xstr("register_name1_tooltip"))
-        self._name1.set_width_chars(15)
-        table.attach(self._name1, 1, 2, row, row+1)
-        label.set_mnemonic_widget(self._name1)
-
-        row += 1
-
-        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
-                                       xscale = 0.0, yscale = 0.0)
-        label = gtk.Label(xstr("register_name2"))
-        label.set_use_underline(True)
-        labelAlignment.add(label)
-        table.attach(labelAlignment, 0, 1, row, row+1)
-
-        self._name2 = gtk.Entry()
-        self._name2.connect("changed", self._updateButtons)
-        self._name2.set_tooltip_text(xstr("register_name2_tooltip"))
-        self._name2.set_width_chars(15)
-        table.attach(self._name2, 1, 2, row, row+1)
-        label.set_mnemonic_widget(self._name2)
-
-        row += 1
-
-        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
-                                       xscale = 0.0, yscale = 0.0)
-        label = gtk.Label(xstr("register_year_of_birth"))
-        label.set_use_underline(True)
-        labelAlignment.add(label)
-        table.attach(labelAlignment, 0, 1, row, row+1)
-
-        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
-                                  xscale = 0.0, yscale = 0.0)
-
-        self._yearOfBirth = gtk.SpinButton()
-        self._yearOfBirth.set_increments(step = 1, page = 10)
-        self._yearOfBirth.set_range(min = RegisterPage._minYearOfBirth,
-                                    max = RegisterPage._maxYearOfBirth)
-        self._yearOfBirth.set_numeric(True)
-        self._yearOfBirth.set_tooltip_text(xstr("register_year_of_birth_tooltip"))
-        self._yearOfBirth.set_width_chars(5)
-        self._yearOfBirth.connect("changed", self._updateButtons)
-        self._yearOfBirth.connect("value-changed", self._updateButtons)
-        alignment.add(self._yearOfBirth)
-        table.attach(alignment, 1, 2, row, row+1)
-        label.set_mnemonic_widget(self._yearOfBirth)
-
-        row += 1
-
-        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
-                                       xscale = 0.0, yscale = 0.0)
-        label = gtk.Label(xstr("register_email"))
-        label.set_use_underline(True)
-        labelAlignment.add(label)
-        table.attach(labelAlignment, 0, 1, row, row+1)
-
-        self._emailAddress = gtk.Entry()
-        self._emailAddress.connect("changed", self._updateButtons)
-        self._emailAddress.set_tooltip_text(xstr("register_email_tooltip"))
-        table.attach(self._emailAddress, 1, 2, row, row+1)
-        label.set_mnemonic_widget(self._emailAddress)
-
-        self._emailAddressPublic = gtk.CheckButton(xstr("register_email_public"))
-        self._emailAddressPublic.set_use_underline(True)
-        self._emailAddressPublic.set_tooltip_text(xstr("register_email_public_tooltip"))
-        table.attach(self._emailAddressPublic, 2, 3, row, row+1)
-
-        row += 1
-
-        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
-                                       xscale = 0.0, yscale = 0.0)
-        label = gtk.Label(xstr("register_vatsim_id"))
-        label.set_use_underline(True)
-        labelAlignment.add(label)
-        table.attach(labelAlignment, 0, 1, row, row+1)
-
-        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
-                                  xscale = 0.0, yscale = 0.0)
-        self._vatsimID = IntegerEntry()
-        self._vatsimID.connect("changed", self._updateButtons)
-        self._vatsimID.set_tooltip_text(xstr("register_vatsim_id_tooltip"))
-        self._vatsimID.set_width_chars(7)
-        alignment.add(self._vatsimID)
-        table.attach(alignment, 1, 2, row, row+1)
-        label.set_mnemonic_widget(self._vatsimID)
-
-        row += 1
-
-        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
-                                       xscale = 0.0, yscale = 0.0)
-        label = gtk.Label(xstr("register_ivao_id"))
-        label.set_use_underline(True)
-        labelAlignment.add(label)
-        table.attach(labelAlignment, 0, 1, row, row+1)
-
-        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
-                                  xscale = 0.0, yscale = 0.0)
-        self._ivaoID = IntegerEntry()
-        self._ivaoID.connect("changed", self._updateButtons)
-        self._ivaoID.set_tooltip_text(xstr("register_ivao_id_tooltip"))
-        self._ivaoID.set_width_chars(7)
-        alignment.add(self._ivaoID)
-        table.attach(alignment, 1, 2, row, row+1)
-        label.set_mnemonic_widget(self._ivaoID)
-
-        row += 1
-
-        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
-                                       xscale = 0.0, yscale = 0.0)
-        label = gtk.Label(xstr("register_phone_num"))
-        label.set_use_underline(True)
-        label.set_use_markup(True)
-        labelAlignment.add(label)
-        table.attach(labelAlignment, 0, 1, row, row+1)
-
-        self._phoneNumber = gtk.Entry()
-        self._phoneNumber.set_tooltip_text(xstr("register_phone_num_tooltip"))
-        table.attach(self._phoneNumber, 1, 2, row, row+1)
-        label.set_mnemonic_widget(self._phoneNumber)
-
-        row += 1
-
-        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
-                                       xscale = 0.0, yscale = 0.0)
-        label = gtk.Label(xstr("register_nationality"))
-        label.set_use_underline(True)
-        label.set_use_markup(True)
-        labelAlignment.add(label)
-        table.attach(labelAlignment, 0, 1, row, row+1)
-
-
-        self._nationality = gtk.Entry()
-        self._nationality.set_tooltip_text(xstr("register_nationality_tooltip"))
-        table.attach(self._nationality, 1, 2, row, row+1)
-        label.set_mnemonic_widget(self._nationality)
-
-        placeholder = gtk.Label()
-        placeholder.set_text(xstr("register_password_mismatch"))
-        placeholder.set_use_markup(True)
-        placeholder.set_child_visible(False)
-        placeholder.hide()
-        table.attach(placeholder, 2, 3, row, row+1)
-
-        row += 1
-
-        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
-                                       xscale = 0.0, yscale = 0.0)
-        label = gtk.Label(xstr("register_password"))
-        label.set_use_underline(True)
-        labelAlignment.add(label)
-        table.attach(labelAlignment, 0, 1, row, row+1)
-
-        self._password = gtk.Entry()
-        self._password.set_visibility(False)
-        self._password.connect("changed", self._updateButtons)
-        self._password.set_tooltip_text(xstr("register_password_tooltip"))
-        table.attach(self._password, 1, 2, row, row+1)
-        label.set_mnemonic_widget(self._password)
-
-        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
-                                  xscale = 0.0, yscale = 0.0)
-        self._passwordStatus = gtk.Label()
-        alignment.add(self._passwordStatus)
-        table.attach(alignment, 2, 3, row, row+1)
-
-        row += 1
-
-        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
-                                       xscale = 0.0, yscale = 0.0)
-        label = gtk.Label(xstr("register_password2"))
-        label.set_use_underline(True)
-        labelAlignment.add(label)
-        table.attach(labelAlignment, 0, 1, row, row+1)
-
-        self._password2 = gtk.Entry()
-        self._password2.set_visibility(False)
-        self._password2.connect("changed", self._updateButtons)
-        self._password2.set_tooltip_text(xstr("register_password2_tooltip"))
-        table.attach(self._password2, 1, 2, row, row+1)
-        label.set_mnemonic_widget(self._password2)
-
-        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
-                                  xscale = 0.0, yscale = 0.0)
-        self._password2Status = gtk.Label()
-        alignment.add(self._password2Status)
-        table.attach(alignment, 2, 3, row, row+1)
-
-        row += 1
-
-        self._rememberButton = gtk.CheckButton(xstr("remember_password"))
-        self._rememberButton.set_use_underline(True)
-        self._rememberButton.set_tooltip_text(xstr("login_remember_tooltip"))
-        table.attach(self._rememberButton, 1, 2, row, row+1)
-
-        cancelButton = \
-          self.addButton(xstr("button_cancel"))
-        cancelButton.connect("clicked", self._cancelClicked)
-
-        self._registerButton = \
-          self.addButton(xstr("button_register"), default = True,
-                              tooltip = xstr("button_register_tooltip"))
-        self._registerButton.connect("clicked", self._registerClicked)
-
-        self._updateButtons()
-
-    @property
-    def name1(self):
-        """Get the first name component entered."""
-        return self._name1.get_text()
-
-    @property
-    def name2(self):
-        """Get the second name component entered."""
-        return self._name2.get_text()
-
-    @property
-    def yearOfBirth(self):
-        """Get the year of birth."""
-        yearOfBirthText = self._yearOfBirth.get_text()
-        return int(yearOfBirthText) if yearOfBirthText else 0
-
-    @property
-    def emailAddress(self):
-        """Get the e-mail address."""
-        return self._emailAddress.get_text()
-
-    @property
-    def emailAddressPublic(self):
-        """Get the whether the e-mail address is public."""
-        return self._emailAddressPublic.get_active()
-
-    @property
-    def vatsimID(self):
-        """Get the VATSIM ID."""
-        return self._vatsimID.get_int()
-
-    @property
-    def ivaoID(self):
-        """Get the IVAO ID."""
-        return self._ivaoID.get_int()
-
-    @property
-    def phoneNumber(self):
-        """Get the phone number."""
-        return self._phoneNumber.get_text()
-
-    @property
-    def nationality(self):
-        """Get the nationality."""
-        return self._nationality.get_text()
-
-    @property
-    def password(self):
-        """Get the password."""
-        return self._password.get_text()
-
-    @property
-    def rememberPassword(self):
-        """Get whether the password should be remembered."""
-        return self._rememberButton.get_active()
-
-    def activate(self):
-        """Setup the route from the booked flight."""
-        self._yearOfBirth.set_value(0)
-        self._yearOfBirth.set_text("")
-        self._updateButtons()
-
-    def _updateButtons(self, widget = None):
-        """Update the sensitive state of the buttons"""
-        yearOfBirth = self.yearOfBirth
-
-        emailAddress = self.emailAddress
-        emailAddressMatch = RegisterPage._emailAddressRE.match(emailAddress)
-
-        vatsimID = self.vatsimID
-        ivaoID = self.ivaoID
-
-        password = self.password
-        password2 = self._password2.get_text()
-        if not password:
-            self._passwordStatus.set_text("")
-        elif len(password)<5:
-            self._passwordStatus.set_text(xstr("register_password_too_short"))
-        else:
-            self._passwordStatus.set_text(xstr("register_password_ok"))
-        self._passwordStatus.set_use_markup(True)
-
-        if len(password)<5 or not password2:
-            self._password2Status.set_text("")
-        elif password!=password2:
-            self._password2Status.set_text(xstr("register_password_mismatch"))
-        else:
-            self._password2Status.set_text(xstr("register_password_ok"))
-        self._password2Status.set_use_markup(True)
-
-        sensitive = \
-            len(self.name1)>0 and len(self.name2)>0 and \
-            yearOfBirth>=RegisterPage._minYearOfBirth and \
-            yearOfBirth<=RegisterPage._maxYearOfBirth and \
-            emailAddressMatch is not None and \
-            (vatsimID>=800000 or ivaoID>=100000) and \
-            len(password)>=5 and password==password2
-
-        self._registerButton.set_sensitive(sensitive)
-
-    def _cancelClicked(self, button):
-        """Called when the Cancel button is clicked."""
-        self.goBack()
-
-    def _registerClicked(self, button):
-        """Called when the Register button is clicked."""
-        nameOrder = xstr("register_nameorder")
-
-        if nameOrder=="eastern":
-            surName = self.name1
-            firstName = self.name2
-        else:
-            surName = self.name2
-            firstName = self.name1
-
-        nationality = self.nationality.lower()
-
-        if getLanguage().lower()=="hu" or nationality.find("hung")!=-1 or \
-           nationality.find("magyar")!=-1:
-            requestedNameOrder = "eastern"
-        else:
-            requestedNameOrder = "western"
-
-        registrationData = web.Registration(surName, firstName,
-                                            requestedNameOrder,
-                                            self.yearOfBirth,
-                                            self.emailAddress,
-                                            self.emailAddressPublic,
-                                            self.vatsimID, self.ivaoID,
-                                            self.phoneNumber, self.nationality,
-                                            self.password)
-        print "Registering with data:"
-        print "  name:", self.name1, self.name2, registrationData.firstName, registrationData.surName, requestedNameOrder
-        print "  yearOfBirth:", self.yearOfBirth, registrationData.yearOfBirth
-        print "  emailAddress:", self.emailAddress, registrationData.emailAddress
-        print "  emailAddressPublic:", self.emailAddressPublic, registrationData.emailAddressPublic
-        print "  vatsimID:", self.vatsimID, registrationData.vatsimID
-        print "  ivaoID:", self.ivaoID, registrationData.ivaoID
-        print "  phoneNumber:", self.phoneNumber, registrationData.phoneNumber
-        print "  nationality:", self.nationality, registrationData.nationality
-
-        gui = self._wizard.gui
-        gui.beginBusy(xstr("register_busy"))
-        gui.webHandler.register(self._registerResultCallback, registrationData)
-
-    def _registerResultCallback(self, returned, result):
-        """Called when the registration result is available."""
-        gobject.idle_add(self._handleRegisterResult, returned, result)
-
-    def _handleRegisterResult(self, returned, result):
-        """Handle the registration result."""
-        gui = self._wizard.gui
-
-        gui.endBusy()
-
-        print "Registration result:"
-        print "  returned:", returned
-        if returned:
-            print "  registered:", result.registered
-            if result.registered:
-                print "  pilotID", result.pilotID
-                print "  loggedIn", result.loggedIn
-            print "  emailAlreadyRegistered:", result.emailAlreadyRegistered
-            print "  invalidData:", result.invalidData
-
-        registrationOK = returned and result.registered
-
-        message = xstr("register_ok") if registrationOK \
-                  else xstr("register_failed")
-        secondaryMessage = None
-        if registrationOK:
-            if result.loggedIn:
-                secondaryMessage = xstr("register_info") % (result.pilotID,)
-            else:
-                secondaryMessage = xstr("register_nologin") % (result.pilotID,)
-            messageType = MESSAGETYPE_INFO
-
-            config = gui.config
-            config.pilotID = result.pilotID
-            config.rememberPassword = self.rememberPassword
-            if config.rememberPassword:
-                config.password = self.password
-            else:
-                config.password = ""
-
-            config.save()
-        elif returned and result.emailAlreadyRegistered:
-            secondaryMessage = xstr("register_email_already")
-            messageType = MESSAGETYPE_ERROR
-        elif returned and result.invalidData:
-            secondaryMessage = xstr("register_invalid_data")
-            messageType = MESSAGETYPE_ERROR
-        else:
-            secondaryMessage = xstr("register_error")
-            messageType = MESSAGETYPE_ERROR
-
-        dialog = gtk.MessageDialog(parent = gui.mainWindow,
-                                   type = messageType,
-                                   message_format = message)
-        dialog.set_title(WINDOW_TITLE_BASE + " - " +
-                         xstr("register_result_title"))
-        dialog.format_secondary_markup(secondaryMessage)
-
-        dialog.add_button(xstr("button_ok"), 0)
-
-        dialog.run()
-        dialog.hide()
-
-        if registrationOK:
-            if result.loggedIn:
-                self._wizard._loginResult = result
-                self._wizard.nextPage()
-            else:
-                self._wizard.jumpPage("login")
-
-#-----------------------------------------------------------------------------
-
-class StudentPage(Page):
-    """A page displayed to students after logging in."""
-    _entryExamStatusQueryInterval = 60*1000
-
-    def __init__(self, wizard):
-        """Construct the student page."""
-        super(StudentPage, self).__init__(wizard, "student",
-                                          xstr("student_title"),
-                                          xstr("student_help"))
-
-
-        self._getEntryExamStatusCancelled = False
-
-        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
-                                  xscale = 0.5, yscale = 0.0)
-
-        table = gtk.Table(6, 4)
-        table.set_row_spacings(4)
-        table.set_col_spacings(0)
-        table.set_homogeneous(False)
-        alignment.add(table)
-        self.setMainWidget(alignment)
-
-        row = 0
-
-        labelAlignment = gtk.Alignment(xalign=0.0, yalign = 0.5,
-                                       xscale=0.0, yscale = 0.0)
-        label = gtk.Label(xstr("student_entry_exam_status"))
-        label.set_alignment(0.0, 0.5)
-        labelAlignment.add(label)
-        labelAlignment.resize_children()
-        table.attach(labelAlignment, 0, 1, row, row + 1, xoptions = FILL)
-
-        alignment = gtk.Alignment(xalign=0.0, yalign = 0.5,
-                                  xscale=1.0, yscale = 0.0)
-        self._entryExamStatus = gtk.Label()
-        self._entryExamStatus.set_use_markup(True)
-        self._entryExamStatus.set_alignment(0.0, 0.5)
-        alignment.add(self._entryExamStatus)
-        alignment.resize_children()
-        table.attach(alignment, 1, 4, row, row + 1)
-
-        row += 1
-
-        buttonAlignment = gtk.Alignment(xalign=0.0, xscale=1.0)
-        button = self._entryExamButton = gtk.Button(xstr("student_entry_exam"))
-        button.set_use_underline(True)
-        button.connect("clicked", self._entryExamClicked)
-        button.set_tooltip_text(xstr("student_entry_exam_tooltip"))
-
-        buttonAlignment.add(button)
-        table.attach(buttonAlignment, 0, 4, row, row + 1, xoptions = FILL,
-                     ypadding = 4)
-
-        row += 3
-
-        labelAlignment = gtk.Alignment(xalign=0.0, yalign = 0.5,
-                                       xscale=0.0, yscale = 0.0)
-        label = gtk.Label(xstr("student_check_flight_status"))
-        labelAlignment.add(label)
-        table.attach(labelAlignment, 0, 1, row, row + 1, xoptions = FILL)
-
-        alignment = gtk.Alignment(xalign=0.0, yalign = 0.5,
-                                  xscale=1.0, yscale = 0.0)
-        self._checkFlightStatus = gtk.Label()
-        self._checkFlightStatus.set_use_markup(True)
-        self._checkFlightStatus.set_alignment(0.0, 0.5)
-        alignment.add(self._checkFlightStatus)
-        table.attach(alignment, 1, 4, row, row + 1)
-
-        row += 1
-
-        alignment = gtk.Alignment(xalign=0.0, xscale=1.0)
-
-        hbox = gtk.HBox()
-        hbox.set_homogeneous(False)
-        hbox.set_spacing(0)
-
-        aircraftTypesModel = gtk.ListStore(str, int)
-        for aircraftType in web.BookedFlight.checkFlightTypes:
-            aircraftTypesModel.append([aircraftNames[aircraftType],
-                                       aircraftType])
-
-        aircraftTypeAlignment = gtk.Alignment(xalign = 0.0, xscale = 1.0)
-
-        self._aircraftType = gtk.ComboBox(model = aircraftTypesModel)
-        renderer = gtk.CellRendererText()
-        self._aircraftType.pack_start(renderer, True)
-        self._aircraftType.add_attribute(renderer, "text", 0)
-        self._aircraftType.set_tooltip_text(xstr("student_check_flight_type_tooltip"))
-        self._aircraftType.set_active(0)
-
-        aircraftTypeAlignment.add(self._aircraftType)
-
-        hbox.pack_start(aircraftTypeAlignment, False, False, 0)
-
-        buttonAlignment = gtk.Alignment(xalign=0.0, xscale=1.0)
-        button = self._checkFlightButton = gtk.Button(xstr("student_check_flight"))
-        button.set_use_underline(True)
-        button.connect("clicked", self._checkFlightClicked)
-        button.set_tooltip_text(xstr("student_check_flight_tooltip"))
-
-        hbox.pack_start(button, True, True, 0)
-
-        alignment.add(hbox)
-        table.attach(alignment, 0, 4, row, row + 1, xoptions = FILL)
-
-    @property
-    def aircraftType(self):
-        """Get the type of the aircraft used to perform the check flight."""
-        index = self._aircraftType.get_active()
-        return self._aircraftType.get_model()[index][1]
-
-    def activate(self):
-        """Activate the student page."""
-        print "StudentPage.activate"
-        self._getEntryExamStatusCancelled = False
-
-        loginResult = self._wizard.loginResult
-        self._entryExamLink = loginResult.entryExamLink
-
-        self._updateEntryExamStatus(loginResult.entryExamPassed)
-        self._getEntryExamStatus()
-
-        # FIXME: call with real value
-        self._updateCheckFlightStatus(self._wizard.loginResult.checkFlightStatus)
-
-    def finalize(self):
-        """Finalize the page."""
-        print "StudentPage.finalize"
-        self._getEntryExamStatusCancelled = True
-
-    def _entryExamClicked(self, button):
-        """Called when the entry exam button is clicked."""
-        webbrowser.open(self._entryExamLink)
-
-    def _getEntryExamStatus(self):
-        """Initiate the query of the entry exam status after the interval."""
-        if not self._getEntryExamStatusCancelled:
-            gobject.timeout_add(StudentPage._entryExamStatusQueryInterval,
-                                lambda: self._wizard.gui.webHandler. \
-                                getEntryExamStatus(self._entryExamStatusCallback))
-
-    def _entryExamStatusCallback(self, returned, result):
-        """Called when the entry exam status is available."""
-        gobject.idle_add(self._handleEntryExamStatus, returned, result)
-
-    def _handleEntryExamStatus(self, returned, result):
-        """Called when the entry exam status is availabe."""
-        print "_handleEntryExamStatus", returned, result
-        if returned and not self._getEntryExamStatusCancelled:
-            self._entryExamLink = result.entryExamLink
-            self._updateEntryExamStatus(result.entryExamPassed)
-            if result.madeFO:
-                self._madeFO()
-            else:
-                self._getEntryExamStatus()
-
-    def _updateEntryExamStatus(self, passed):
-        """Update the entry exam status display and button."""
-        self._entryExamStatus.set_text(xstr("student_entry_exam_passed")
-                                       if passed else
-                                       xstr("student_entry_exam_not_passed"))
-        self._entryExamStatus.set_use_markup(True)
-        self._entryExamButton.set_sensitive(not passed)
-        self._wizard._loginResult.entryExamPassed = passed
-
-    def _checkFlightClicked(self, button):
-        """Called when the check flight button is clicked."""
-        aircraftType = self.aircraftType
-        self._wizard._bookedFlight = \
-            web.BookedFlight.forCheckFlight(aircraftType)
-        self._wizard.gui.enableFlightInfo(aircraftType)
-        self._wizard.jumpPage("connect")
-
-    def _updateCheckFlightStatus(self, passed):
-        """Update the status of the check flight."""
-        self._aircraftType.set_sensitive(not passed)
-        self._checkFlightStatus.set_text(xstr("student_check_flight_passed")
-                                         if passed else
-                                         xstr("student_check_flight_not_passed"))
-        self._checkFlightStatus.set_use_markup(True)
-        self._checkFlightButton.set_sensitive(not passed)
-
-    def _madeFO(self):
-        """Handle the event when the pilot has become a first officer."""
-        wizard = self._wizard
-        loginResult = wizard.loginResult
-        loginResult.rank = "FO"
-
-        gui = wizard.gui
-
-        dialog = gtk.MessageDialog(parent = gui.mainWindow,
-                                   type = MESSAGETYPE_INFO,
-                                   message_format = xstr("student_fo"))
-
-        dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
-        dialog.set_title(WINDOW_TITLE_BASE)
-        secondary = xstr("student_fo_secondary")
-        dialog.format_secondary_markup(secondary)
-        dialog.run()
-        dialog.hide()
-
-        gui.reset()
 
 #-----------------------------------------------------------------------------
@@ -1586,6 +901,5 @@
                "Then press the Connect button to connect to the simulator."
         completedHelp = "The basic data of your flight can be read below."
-        super(ConnectPage, self).__init__(wizard, "connect",
-                                          xstr("connect_title"),
+        super(ConnectPage, self).__init__(wizard, xstr("connect_title"),
                                           xstr("connect_help"),
                                           completedHelp = xstr("connect_chelp"))
@@ -1698,6 +1012,5 @@
         self.addCancelFlightButton()
 
-        self._previousButton = \
-          self.addPreviousButton(clicked = self._backClicked)
+        self.addPreviousButton(clicked = self._backClicked)
 
         self._button = self.addButton(xstr("button_connect"), default = True,
@@ -1733,6 +1046,4 @@
             self._selectMSFS.set_active(config.defaultMSFS)
             self._selectXPlane.set_active(not config.defaultMSFS)
-
-        self._previousButton.set_sensitive(not self._wizard.entranceExam)
 
     def finalize(self):
@@ -1773,6 +1084,5 @@
     def __init__(self, wizard):
         """Construct the page."""
-        super(PayloadPage, self).__init__(wizard, "payload",
-                                          xstr("payload_title"),
+        super(PayloadPage, self).__init__(wizard, xstr("payload_title"),
                                           xstr("payload_help"),
                                           completedHelp = xstr("payload_chelp"))
@@ -2001,6 +1311,5 @@
     current time from the flight simulator."""
     def __init__(self, wizard):
-        super(TimePage, self).__init__(wizard, "time",
-                                       xstr("time_title"),
+        super(TimePage, self).__init__(wizard, xstr("time_title"),
                                        xstr("time_help"),
                                        completedHelp = xstr("time_chelp"))
@@ -2123,6 +1432,5 @@
     def __init__(self, wizard):
         """Construct the page."""
-        super(RoutePage, self).__init__(wizard, "route",
-                                        xstr("route_title"),
+        super(RoutePage, self).__init__(wizard, xstr("route_title"),
                                         xstr("route_help"),
                                         completedHelp = xstr("route_chelp"))
@@ -2251,5 +1559,5 @@
         alternate = self._alternate.get_text()
         self._button.set_sensitive(cruiseLevel>=50 and self._getRoute()!="" and
-                                   (len(alternate)==4 or self._wizard.entranceExam))
+                                   len(alternate)==4)
 
     def _cruiseLevelChanged(self, *arg):
@@ -2292,8 +1600,8 @@
         if self._wizard.gui.config.useSimBrief and \
            self._wizard.usingSimBrief is not False:
-            self._wizard.jumpPage("simbrief_setup")
+            self._wizard.nextPage()
         else:
             self._wizard.usingSimBrief = False
-            self._wizard.jumpPage("fuel")
+            self._wizard.jumpPage(3)
 
 #-----------------------------------------------------------------------------
@@ -2454,5 +1762,5 @@
         """Construct the setup page."""
 
-        super(SimBriefSetupPage, self).__init__(wizard, "simbrief_setup",
+        super(SimBriefSetupPage, self).__init__(wizard,
                                                 xstr("simbrief_setup_title"),
                                                 xstr("simbrief_setup_help"),
@@ -2773,5 +2081,5 @@
 
                 self._wizard.usingSimBrief = False
-                self._wizard.jumpPage("fuel", fromPageShift = 1)
+                self._wizard.jumpPage(2, fromPageShift = 1)
 
     def _getPlan(self):
@@ -2858,5 +2166,5 @@
         """Construct the setup page."""
 
-        super(SimBriefingPage, self).__init__(wizard, "simbrief_result",
+        super(SimBriefingPage, self).__init__(wizard,
                                               xstr("simbrief_result_title"), "")
 
@@ -3114,6 +2422,5 @@
     def __init__(self, wizard):
         """Construct the page."""
-        super(FuelPage, self).__init__(wizard, "fuel",
-                                       xstr("fuel_title"),
+        super(FuelPage, self).__init__(wizard, xstr("fuel_title"),
                                        xstr("fuel_help_pre") +
                                        xstr("fuel_help_post"),
@@ -3167,7 +2474,7 @@
             self._pump()
         elif self._wizard.usingSimBrief:
-            self._wizard.jumpPage("takeoff")
+            self._wizard.jumpPage(3)
         else:
-            self._wizard.jumpPage("briefing1")
+            self._wizard.nextPage()
 
     def _setupTanks(self, tankData):
@@ -3215,5 +2522,5 @@
             if self._wizard.usingSimBrief:
                 self._wizard.gui.startMonitoring()
-                self._wizard.jumpPage("takeoff")
+                self._wizard.jumpPage(3)
             else:
                 bookedFlight = self._wizard._bookedFlight
@@ -3284,13 +2591,9 @@
         self._departure = departure
 
-        number = 1 if departure else 2
-
-        title = xstr("briefing_title") % (number,
+        title = xstr("briefing_title") % (1 if departure else 2,
                                           xstr("briefing_departure")
                                           if departure
                                           else xstr("briefing_arrival"))
-        super(BriefingPage, self).__init__(wizard,
-                                           "briefing%d" % (number,),
-                                           title, xstr("briefing_help"),
+        super(BriefingPage, self).__init__(wizard, title, xstr("briefing_help"),
                                            completedHelp = xstr("briefing_chelp"))
 
@@ -3479,6 +2782,5 @@
     def __init__(self, wizard):
         """Construct the takeoff page."""
-        super(TakeoffPage, self).__init__(wizard, "takeoff",
-                                          xstr("takeoff_title"),
+        super(TakeoffPage, self).__init__(wizard, xstr("takeoff_title"),
                                           xstr("takeoff_help"),
                                           completedHelp = xstr("takeoff_chelp"))
@@ -3968,6 +3270,5 @@
     def __init__(self, wizard):
         """Construct the page."""
-        super(CruisePage, self).__init__(wizard, "cruise",
-                                         xstr("cruise_title"),
+        super(CruisePage, self).__init__(wizard, xstr("cruise_title"),
                                          xstr("cruise_help"))
 
@@ -4083,6 +3384,5 @@
     def __init__(self, wizard):
         """Construct the landing page."""
-        super(LandingPage, self).__init__(wizard, "landing",
-                                          xstr("landing_title"),
+        super(LandingPage, self).__init__(wizard, xstr("landing_title"),
                                           xstr("landing_help"),
                                           completedHelp = xstr("landing_chelp"))
@@ -4350,18 +3650,15 @@
     def _forwardClicked(self, button):
         """Called when the forward button is clicked."""
-        wizard = self._wizard
-
-        aircraft = wizard.gui.flight.aircraft
+        aircraft = self._wizard.gui.flight.aircraft
         aircraft.updateVRef()
         aircraft.updateLandingAntiIce()
-        if wizard.gui.config.onlineGateSystem and \
-           wizard.loggedIn and not self._completed and \
-           wizard.bookedFlight.arrivalICAO=="LHBP" and \
-           not wizard.entranceExam:
-            wizard.getFleet(callback = self._fleetRetrieved, force = True)
-        elif wizard.entranceExam:
-            self._handleEntranceExamDone()
+        if self._wizard.gui.config.onlineGateSystem and \
+           self._wizard.loggedIn and not self._completed and \
+           self._wizard.bookedFlight.arrivalICAO=="LHBP" and \
+           not self._wizard.entranceExam:
+            self._wizard.getFleet(callback = self._fleetRetrieved,
+                                  force = True)
         else:
-            wizard.nextPage()
+            self._wizard.nextPage()
 
     def _fleetRetrieved(self, fleet):
@@ -4389,144 +3686,4 @@
             self._updatingMETAR = False
 
-    def _handleEntranceExamDone(self):
-        """Handle the end of the entrance exam.
-
-        If the there was a NO-GO fault, notify the user that exam is a failure
-        and take them back to the student page. Otherwise congratulate, update
-        the database to reflect that the exam has been taken and go back to the
-        student page."""
-        self._wizard.jumpPage("chkfinish")
-
-#-----------------------------------------------------------------------------
-
-class PIREPSaveHelper(object):
-    """A helper to use for saving PIREPs."""
-    def __init__(self, wizard):
-        """Construct the helper."""
-        super(PIREPSaveHelper, self).__init__()
-
-        self._wizard = wizard
-
-        self._lastSavePath = None
-        self._savePIREPDialog = None
-
-    def addButton(self, page):
-        """Add a button to save the PIREP to the given page."""
-        return page.addButton(xstr("finish_save"), sensitive = False,
-                              clicked = self._saveClicked,
-                              tooltip = xstr("finish_save_tooltip"),
-                              clickedArg = page)
-
-    def autoSavePIREP(self, page):
-        """Perform the automatic saving of the PIREP."""
-        self._lastSavePath = os.path.join(self._wizard.gui.config.pirepDirectory,
-                                          self._getDefaultPIREPName())
-        self._lastSavePath = text2unicode(self._lastSavePath)
-        self._savePIREP(page, automatic = True)
-
-    def _getDefaultPIREPName(self):
-        """Get the default name of the PIREP."""
-        gui = self._wizard.gui
-
-        bookedFlight = gui.bookedFlight
-        tm = time.gmtime()
-
-        pilotID = self._wizard.pilotID
-        if pilotID: pilotID += " "
-        return "%s%s %02d%02d %s-%s.pirep" % \
-               (pilotID, str(bookedFlight.departureTime.date()),
-                tm.tm_hour, tm.tm_min,
-                bookedFlight.departureICAO, bookedFlight.arrivalICAO)
-
-    def _saveClicked(self, button, page):
-        """Called when the Save PIREP button is clicked."""
-        gui = self._wizard.gui
-
-        fileName = self._getDefaultPIREPName()
-
-        dialog = self._getSaveDialog()
-
-        if self._lastSavePath is None:
-            pirepDirectory = gui.config.pirepDirectory
-            if pirepDirectory is not None:
-                dialog.set_current_folder(pirepDirectory)
-        else:
-            dialog.set_current_folder(os.path.dirname(self._lastSavePath))
-
-        dialog.set_current_name(fileName)
-        result = dialog.run()
-        dialog.hide()
-
-        if result==RESPONSETYPE_OK:
-            self._lastSavePath = text2unicode(dialog.get_filename())
-            self._savePIREP(page)
-
-    def _savePIREP(self, page, automatic = False):
-        """Perform the saving of the PIREP."""
-
-        gui = self._wizard.gui
-
-        if automatic:
-            gui.beginBusy(xstr("finish_autosave_busy"))
-
-        pirep = PIREP(gui.flight)
-        error = pirep.save(self._lastSavePath)
-
-        if automatic:
-            gui.endBusy()
-
-        if error:
-            type = MESSAGETYPE_ERROR
-            message = xstr("finish_save_failed")
-            secondary = xstr("finish_save_failed_sec") % (text2unicode(error),)
-        else:
-            type = MESSAGETYPE_INFO
-            message = xstr("finish_save_done")
-            if automatic:
-                secondary = xstr("finish_save_done_sec") % (self._lastSavePath,)
-            else:
-                secondary = None
-            page.setPIREPSaved()
-
-        dialog = gtk.MessageDialog(parent = gui.mainWindow,
-                                   type = type, message_format = message)
-        dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
-        dialog.set_title(WINDOW_TITLE_BASE)
-        if secondary is not None:
-            dialog.format_secondary_markup(secondary)
-
-        dialog.run()
-        dialog.hide()
-
-    def _getSaveDialog(self):
-        """Get the PIREP saving dialog.
-
-        If it does not exist yet, create it."""
-        if self._savePIREPDialog is None:
-            gui = self._wizard.gui
-            dialog = gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
-                                           xstr("finish_save_title"),
-                                           action = FILE_CHOOSER_ACTION_SAVE,
-                                           buttons = (gtk.STOCK_CANCEL,
-                                                      RESPONSETYPE_CANCEL,
-                                                      gtk.STOCK_OK, RESPONSETYPE_OK),
-                                           parent = gui.mainWindow)
-            dialog.set_modal(True)
-            dialog.set_do_overwrite_confirmation(True)
-
-            filter = gtk.FileFilter()
-            filter.set_name(xstr("file_filter_pireps"))
-            filter.add_pattern("*.pirep")
-            dialog.add_filter(filter)
-
-            filter = gtk.FileFilter()
-            filter.set_name(xstr("file_filter_all"))
-            filter.add_pattern("*.*")
-            dialog.add_filter(filter)
-
-            self._savePIREPDialog = dialog
-
-        return self._savePIREPDialog
-
 #-----------------------------------------------------------------------------
 
@@ -4538,9 +3695,8 @@
                      ("flighttype_charter", const.FLIGHTTYPE_CHARTER) ]
 
-    def __init__(self, wizard, saveHelper):
+    def __init__(self, wizard):
         """Construct the finish page."""
         help = xstr("finish_help") + xstr("finish_help_goodtime")
-        super(FinishPage, self).__init__(wizard, "finish",
-                                         xstr("finish_title"), help)
+        super(FinishPage, self).__init__(wizard, xstr("finish_title"), help)
 
         alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
@@ -4725,6 +3881,10 @@
         self.addPreviousButton(clicked = self._backClicked)
 
-        self._saveHelper = saveHelper
-        self._saveButton = saveHelper.addButton(self)
+        self._saveButton = self.addButton(xstr("finish_save"),
+                                          sensitive = False,
+                                          clicked = self._saveClicked,
+                                          tooltip = xstr("finish_save_tooltip"))
+        self._savePIREPDialog = None
+        self._lastSavePath = None
 
         self._tooBigTimeDifference = False
@@ -4826,5 +3986,5 @@
         if gui.config.pirepAutoSave and sensitive and not wasSensitive:
             if gui.isWizardActive():
-                self._saveHelper.autoSavePIREP(self)
+                self._autoSavePIREP()
             else:
                 self._deferredAutoSave = True
@@ -4841,10 +4001,13 @@
         super(FinishPage, self).grabDefault()
         if self._deferredAutoSave:
-            self._saveHelper.autoSavePIREP(self)
+            self._autoSavePIREP()
             self._deferredAutoSave = False
 
-    def setPIREPSaved(self):
-        """Mark the PIREP as saved."""
-        self._pirepSaved = True
+    def _autoSavePIREP(self):
+        """Perform the automatic saving of the PIREP."""
+        self._lastSavePath = os.path.join(self._wizard.gui.config.pirepDirectory,
+                                          self._getDefaultPIREPName())
+        self._lastSavePath = text2unicode(self._lastSavePath)
+        self._savePIREP(automatic = True)
 
     def _backClicked(self, button):
@@ -4878,4 +4041,110 @@
 
         gui.reset()
+
+    def _getDefaultPIREPName(self):
+        """Get the default name of the PIREP."""
+        gui = self._wizard.gui
+
+        bookedFlight = gui.bookedFlight
+        tm = time.gmtime()
+
+        pilotID = self._wizard.pilotID
+        if pilotID: pilotID += " "
+        return "%s%s %02d%02d %s-%s.pirep" % \
+               (pilotID, str(bookedFlight.departureTime.date()),
+                tm.tm_hour, tm.tm_min,
+                bookedFlight.departureICAO, bookedFlight.arrivalICAO)
+
+
+    def _saveClicked(self, button):
+        """Called when the Save PIREP button is clicked."""
+        gui = self._wizard.gui
+
+        fileName = self._getDefaultPIREPName()
+
+        dialog = self._getSaveDialog()
+
+        if self._lastSavePath is None:
+            pirepDirectory = gui.config.pirepDirectory
+            if pirepDirectory is not None:
+                dialog.set_current_folder(pirepDirectory)
+        else:
+            dialog.set_current_folder(os.path.dirname(self._lastSavePath))
+
+        dialog.set_current_name(fileName)
+        result = dialog.run()
+        dialog.hide()
+
+        if result==RESPONSETYPE_OK:
+            self._lastSavePath = text2unicode(dialog.get_filename())
+            self._savePIREP()
+
+    def _savePIREP(self, automatic = False):
+        """Perform the saving of the PIREP."""
+
+        gui = self._wizard.gui
+
+        if automatic:
+            gui.beginBusy(xstr("finish_autosave_busy"))
+
+        pirep = PIREP(gui.flight)
+        error = pirep.save(self._lastSavePath)
+
+        if automatic:
+            gui.endBusy()
+
+        if error:
+            type = MESSAGETYPE_ERROR
+            message = xstr("finish_save_failed")
+            secondary = xstr("finish_save_failed_sec") % (text2unicode(error),)
+        else:
+            type = MESSAGETYPE_INFO
+            message = xstr("finish_save_done")
+            if automatic:
+                secondary = xstr("finish_save_done_sec") % (self._lastSavePath,)
+            else:
+                secondary = None
+            self._pirepSaved = True
+
+        dialog = gtk.MessageDialog(parent = gui.mainWindow,
+                                   type = type, message_format = message)
+        dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+        dialog.set_title(WINDOW_TITLE_BASE)
+        if secondary is not None:
+            dialog.format_secondary_markup(secondary)
+
+        dialog.run()
+        dialog.hide()
+
+    def _getSaveDialog(self):
+        """Get the PIREP saving dialog.
+
+        If it does not exist yet, create it."""
+        if self._savePIREPDialog is None:
+            gui = self._wizard.gui
+            dialog = gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
+                                           xstr("finish_save_title"),
+                                           action = FILE_CHOOSER_ACTION_SAVE,
+                                           buttons = (gtk.STOCK_CANCEL,
+                                                      RESPONSETYPE_CANCEL,
+                                                      gtk.STOCK_OK, RESPONSETYPE_OK),
+                                           parent = gui.mainWindow)
+            dialog.set_modal(True)
+            dialog.set_do_overwrite_confirmation(True)
+
+            filter = gtk.FileFilter()
+            filter.set_name(xstr("file_filter_pireps"))
+            filter.add_pattern("*.pirep")
+            dialog.add_filter(filter)
+
+            filter = gtk.FileFilter()
+            filter.set_name(xstr("file_filter_all"))
+            filter.add_pattern("*.*")
+            dialog.add_filter(filter)
+
+            self._savePIREPDialog = dialog
+
+        return self._savePIREPDialog
+
 
     def _sendClicked(self, button):
@@ -4972,121 +4241,4 @@
 #-----------------------------------------------------------------------------
 
-class CheckFlightFinishPage(Page):
-    """Finish page for a check flight."""
-    def __init__(self, wizard, saveHelper):
-        """Construct the check flight finish page."""
-        super(CheckFlightFinishPage, self).__init__(wizard,
-                                                    "chkfinish",
-                                                    xstr("chkfinish_title"),
-                                                    "")
-
-        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
-                                  xscale = 1.0, yscale = 1.0)
-        self._label = gtk.Label()
-        alignment.add(self._label)
-
-        self.setMainWidget(alignment)
-
-        self._saveHelper = saveHelper
-        self._saveButton = saveHelper.addButton(self)
-
-        self._button = self.addNextButton(sensitive = False,
-                                          clicked =  self._forwardClicked)
-
-    def activate(self):
-        """Activate the page."""
-        wizard = self._wizard
-        loginResult = wizard.loginResult
-        gui = wizard.gui
-        rating = gui.flight.logger.getRating()
-
-        if rating>=0:
-            loginResult.checkFlightStatus = True
-
-        firstOfficer = \
-          loginResult.entryExamPassed and loginResult.checkFlightStatus
-
-        if firstOfficer:
-            loginResult.rank = "FO"
-
-        if rating<0:
-            mainMessage = xstr("chkfinish_failed")
-        else:
-            mainMessage = xstr("chkfinish_passed_begin")
-            if firstOfficer:
-                mainMessage += xstr("chkfinish_passed_fo")
-            mainMessage += xstr("chkfinish_passed_end")
-
-        if firstOfficer:
-            nextMessage = xstr("chkfinish_next")
-        else:
-            nextMessage = xstr("chkfinish_next_student_begin")
-            if not loginResult.entryExamPassed and \
-               not loginResult.checkFlightStatus:
-                nextMessage += xstr("chkfinish_next_student_nothing")
-            elif loginResult.entryExamPassed and \
-                 not loginResult.checkFlightStatus:
-                nextMessage += xstr("chkfinish_next_student_no_flight")
-            elif not loginResult.entryExamPassed and \
-                 loginResult.checkFlightStatus:
-                nextMessage += xstr("chkfinish_next_student_no_exam")
-
-        self._label.set_text(mainMessage +
-                             xstr("chkfinish_savepirep") +
-                             nextMessage)
-        self._label.set_use_markup(True)
-        self._label.set_alignment(0.5, 0.0)
-
-        self._saveButton.set_sensitive(True)
-        self._button.set_sensitive(True)
-
-    def _forwardClicked(self, button):
-        """Jump to the student page if there are some tasks to do,
-        or to the flight selection page, if the pilot is allowed to perform
-        MAVA flights."""
-        wizard = self._wizard
-        gui = wizard.gui
-
-        loginResult = wizard.loginResult
-        if loginResult.checkFlightStatus:
-            gui.beginBusy(xstr("chkfinish_updateweb_busy"))
-            gui.webHandler.setCheckFlightPassed(self._checkFlightPassedSetCallback,
-                                                wizard.checkFlightAircraftType)
-        else:
-            self._resetGUI()
-
-    def _checkFlightPassedSetCallback(self, returned, result):
-        """Called when the check flight status has been set."""
-        gobject.idle_add(self._checkFlightPassedSet, returned, result)
-
-    def _checkFlightPassedSet(self, returned, result):
-        """Handle the result of an attempt to set the check flight status."""
-        gui = self._wizard.gui
-
-        gui.endBusy()
-
-        if returned:
-            self._resetGUI()
-        else:
-            dialog = gtk.MessageDialog(parent = gui.mainWindow,
-                                       type = MESSAGETYPE_ERROR,
-                                       message_format =
-                                       xstr("chkfinish_passedset_failed"))
-            dialog.set_title(WINDOW_TITLE_BASE + " - " +
-                             xstr("chkfinish_passedset_failed_title"))
-            dialog.format_secondary_markup(xstr("chkfinish_passedset_failed_secondary"))
-
-            dialog.add_button(xstr("button_ok"), 0)
-
-            dialog.run()
-            dialog.hide()
-
-    def _resetGUI(self):
-        """Reset the GUI."""
-        gui = self._wizard.gui
-        gui.reset()
-
-#-----------------------------------------------------------------------------
-
 class Wizard(gtk.VBox):
     """The flight wizard."""
@@ -5104,7 +4256,4 @@
         self._pages.append(FlightSelectionPage(self))
         self._pages.append(GateSelectionPage(self))
-        self._pages.append(RegisterPage(self))
-        self._studentPage = StudentPage(self)
-        self._pages.append(self._studentPage)
         self._pages.append(ConnectPage(self))
         self._payloadPage = PayloadPage(self)
@@ -5130,10 +4279,6 @@
         self._landingPage = LandingPage(self)
         self._pages.append(self._landingPage)
-
-        pirepSaveHelper = PIREPSaveHelper(self)
-
-        self._finishPage = FinishPage(self, pirepSaveHelper)
+        self._finishPage = FinishPage(self)
         self._pages.append(self._finishPage)
-        self._pages.append(CheckFlightFinishPage(self, pirepSaveHelper))
 
         self._requestedWidth = None
@@ -5183,5 +4328,5 @@
     def entranceExam(self):
         """Get whether an entrance exam is about to be taken."""
-        return self._loginResult is not None and self._loginResult.rank=="STU"
+        return self._loginPage.entranceExam
 
     @property
@@ -5194,9 +4339,4 @@
         """Get the login result."""
         return self._loginResult
-
-    @property
-    def checkFlightAircraftType(self):
-        """Get the type of the aircraft used to perform the check flight."""
-        return self._studentPage.aircraftType
 
     def setCurrentPage(self, index, finalize = False, fromPageShift = None):
@@ -5411,14 +4551,9 @@
     def nextPage(self, finalize = True):
         """Go to the next page."""
-        nextPageID = self._pages[self._currentPage].nextPageID
-        self.jumpPage(1 if nextPageID is None else nextPageID, finalize)
-
-    def jumpPage(self, countOrID, finalize = True, fromPageShift = None):
+        self.jumpPage(1, finalize)
+
+    def jumpPage(self, count, finalize = True, fromPageShift = None):
         """Go to the page which is 'count' pages after the current one."""
-        if isinstance(countOrID, str):
-            targetIndex = self._getIndexOf(countOrID)
-        else:
-            targetIndex = self._currentPage + countOrID
-        self.setCurrentPage(targetIndex,
+        self.setCurrentPage(self._currentPage + count,
                             finalize = finalize, fromPageShift = fromPageShift)
 
@@ -5481,5 +4616,5 @@
         #self.setCurrentPage(10)
 
-    def login(self, callback, pilotID, password):
+    def login(self, callback, pilotID, password, entranceExam):
         """Called when the login button was clicked."""
         self._loginCallback = callback
@@ -5489,4 +4624,5 @@
             pilotID = loginResult.pilotID
             password = loginResult.password
+            entranceExam = loginResult.entranceExam
             busyMessage = xstr("reload_busy")
         else:
@@ -5497,20 +4633,10 @@
 
         self.gui.webHandler.login(self._loginResultCallback,
-                                  pilotID, password)
+                                  pilotID, password,
+                                  entranceExam = entranceExam)
 
     def reloadFlights(self, callback):
         """Reload the flights from the MAVA server."""
-        self.login(callback, None, None)
-
-    def cancelFlight(self, reloadCallback):
-        """Cancel the flight.
-
-        If it is an entry exam flight, we go back to the student page.
-        Otherwise we reload the flights."""
-        if self.entranceExam:
-            self.reset(None)
-            self.jumpPage("student")
-        else:
-            self.reloadFlights(reloadCallback)
+        self.login(callback, None, None, None)
 
     def cruiseLevelChanged(self):
@@ -5661,13 +4787,3 @@
                 self._arrivalBriefingPage.setMETAR(metar)
 
-    def _getIndexOf(self, pageID):
-        """Get the index for the given page ID.
-
-        It is an assertion failure if the ID is not found."""
-        for index in range(0, len(self._pages)):
-            page = self._pages[index]
-            if page.id==pageID:
-                return index
-        assert False
-
 #-----------------------------------------------------------------------------
Index: src/mlx/gui/gui.py
===================================================================
--- src/mlx/gui/gui.py	(revision 769)
+++ src/mlx/gui/gui.py	(revision 746)
@@ -447,6 +447,4 @@
                                     self._mainWindow)
             self._updater.start()
-        else:
-            self.updateDone()
 
         cef.initialize(self._programDirectory, self._cefInitialized)
@@ -459,8 +457,4 @@
 
         self._disconnect()
-
-    def updateDone(self):
-        """Called when the update is done (and there is no need to restart)."""
-        gobject.idle_add(self._updateDone)
 
     def connected(self, fsType, descriptor):
@@ -581,5 +575,5 @@
 
         if self.loggedIn:
-            self._wizard.cancelFlight(self._handleReloadResult)
+            self._wizard.reloadFlights(self._handleReloadResult)
         else:
             self._wizard.reset(None)
@@ -1700,24 +1694,2 @@
             self._credentialsAvailable = True
             self._credentialsCondition.notify()
-
-    def _updateDone(self):
-        """Called when the update is done.
-
-        It checks if we already know the PID, and if not, asks the user whether
-        to register."""
-        if not self.config.pilotID and not self.config.password:
-            dialog = gtk.MessageDialog(parent = self._mainWindow,
-                                       type = MESSAGETYPE_QUESTION,
-                                       message_format = xstr("register_ask"))
-
-            dialog.set_title(WINDOW_TITLE_BASE)
-            dialog.format_secondary_markup(xstr("register_ask_sec"))
-
-            dialog.add_button(xstr("button_cancel"), 0)
-            dialog.add_button(xstr("button_register"), 1)
-            dialog.set_default_response(1)
-
-            result = dialog.run()
-            dialog.hide()
-            if result == 1:
-                self._wizard.jumpPage("register")
Index: src/mlx/gui/monitor.py
===================================================================
--- src/mlx/gui/monitor.py	(revision 765)
+++ src/mlx/gui/monitor.py	(revision 680)
@@ -378,8 +378,5 @@
                 for n1 in aircraftState.n1:
                     if n1Str: n1Str += ", "
-                    if n1 is None:
-                        n1Str += "?"
-                    else:
-                        n1Str += "%.0f" % (n1,)
+                    n1Str += "%.0f" % (n1,)
             elif aircraftState.rpm is not None:
                 n1Str = ""
Index: src/mlx/gui/update.py
===================================================================
--- src/mlx/gui/update.py	(revision 755)
+++ src/mlx/gui/update.py	(revision 300)
@@ -124,5 +124,4 @@
         if not self._waitAfterFinish:
             gobject.idle_add(self._progressWindow.hide)
-            self._gui.updateDone()
 
     def downloadingManifest(self):
@@ -287,6 +286,4 @@
         if self._restart:
             self._gui.restart()
-        else:
-            self._gui.updateDone()
 
 #-------------------------------------------------------------------------------
Index: src/mlx/pirep.py
===================================================================
--- src/mlx/pirep.py	(revision 778)
+++ src/mlx/pirep.py	(revision 743)
@@ -104,9 +104,4 @@
 
     @property
-    def flightDateText(self):
-        """Get the text version of the booked flight's departure time."""
-        return self.bookedFlight.departureTime.strftime("%Y-%m-%d")
-
-    @property
     def flightTypeText(self):
         """Get the text representation of the flight type."""
@@ -199,8 +194,4 @@
         attrs = {}
         attrs["log"] = self.getACARSText()
-        attrs["flightDate"] = self.flightDateText
-        attrs["callsign"] = self.bookedFlight.callsign
-        attrs["departureICAO"] = self.bookedFlight.departureICAO
-        attrs["arrivalICAO"] = self.bookedFlight.arrivalICAO
         attrs["numPassengers"] = self.numPassengers
         attrs["numCrew"] = self.numCrew
@@ -232,5 +223,5 @@
         attrs["flownDistance"] = self.flownDistance
         # FIXME: it should be stored in the PIREP when it is sent later
-        attrs["performDate"] = datetime.date.today().strftime("%Y-%m-%d")
+        attrs["flightDate"] = datetime.date.today().strftime("%Y-%m-%d")
 
         return ([], attrs)
Index: src/mlx/rpc.py
===================================================================
--- src/mlx/rpc.py	(revision 769)
+++ src/mlx/rpc.py	(revision 745)
@@ -125,25 +125,4 @@
 #---------------------------------------------------------------------------------------
 
-class Registration(object):
-    """Data for registration."""
-    def __init__(self, surName, firstName, nameOrder,
-                 yearOfBirth, emailAddress, emailAddressPublic,
-                 vatsimID, ivaoID, phoneNumber, nationality, password):
-        """Construct the registration data."""
-        self.surName = surName
-        self.firstName = firstName
-        self.nameOrder = nameOrder
-        self.yearOfBirth = yearOfBirth
-        self.emailAddress = emailAddress
-        self.emailAddressPublic = 1 if emailAddressPublic is True else \
-          0 if emailAddressPublic is False else emailAddressPublic
-        self.vatsimID = "" if vatsimID is None else vatsimID
-        self.ivaoID = "" if ivaoID is None else ivaoID
-        self.phoneNumber = phoneNumber
-        self.nationality = nationality
-        self.password = password
-
-#---------------------------------------------------------------------------------------
-
 class RPCException(Exception):
     """An exception thrown by RPC operations."""
@@ -176,7 +155,4 @@
     RESULT_DATABASE_ERROR = 3
 
-    # Result code: invalid data
-    RESULT_INVALID_DATA = 4
-
     # Result code: the flight does not exist
     RESULT_FLIGHT_NOT_EXISTS = 101
@@ -184,7 +160,4 @@
     # Result code: the flight has already been reported.
     RESULT_FLIGHT_ALREADY_REPORTED = 102
-
-    # Result code: a user with the given e-mail address already exists
-    RESULT_EMAIL_ALREADY_REGISTERED = 103
 
     def __init__(self, getCredentialsFn):
@@ -216,15 +189,4 @@
         self._sessionID = None
 
-    def register(self, registrationData):
-        """Register with the given data.
-
-        Returns a tuple of:
-        - the error code,
-        - the PID if there is no error."""
-        reply = Reply(self._server.register(registrationData))
-
-        return (reply.result,
-                reply.value["pid"] if reply.result==Client.RESULT_OK else None)
-
     def login(self):
         """Login using the given previously set credentials.
@@ -232,5 +194,5 @@
         The session ID is stored in the object and used for later calls.
 
-        Returns the name of the pilot on success, or None on error."""
+        Returns a boolean indicating if login has succeeded."""
         self._sessionID = None
 
@@ -239,5 +201,5 @@
             self._loginCount += 1
             self._sessionID = reply.value["sessionID"]
-            return (reply.value["name"], reply.value["rank"])
+            return reply.value["name"]
         else:
             return None
@@ -256,11 +218,4 @@
 
         return flights
-
-    def getEntryExamStatus(self):
-        """Get the status of the exams needed for joining MAVA."""
-        value = self._performCall(lambda sessionID:
-                                  self._server.getEntryExamStatus(sessionID))
-        return (value["entryExamPassed"], value["entryExamLink"],
-                value["checkFlightStatus"], value["madeFO"])
 
     def getFleet(self):
@@ -292,9 +247,4 @@
         self._performCall(lambda sessionID:
                           self._server.updateOnlineACARS(sessionID, acars))
-
-    def setCheckFlightPassed(self, type):
-        """Mark the check flight of the user passed with the given type."""
-        self._performCall(lambda sessionID:
-                          self._server.setCheckFlightPassed(sessionID, type))
 
     def _performCall(self, callFn, acceptResults = []):
Index: src/mlx/update.py
===================================================================
--- src/mlx/update.py	(revision 781)
+++ src/mlx/update.py	(revision 681)
@@ -297,28 +297,4 @@
 #------------------------------------------------------------------------------
 
-def removeFiles(directory, listener, removed, count):
-    """Remove the given files."""
-    toremoveDir = None
-    
-    listener.startRemoving()
-
-    removed.sort(reverse = True)
-    for path in removed:
-        removePath = createLocalPath(directory, path)
-        removeFile(toremoveDir, directory, removePath)
-
-        removeDirectory = os.path.dirname(removePath)
-        try:
-            os.removedirs(removeDirectory)
-        except:
-            pass
-
-        count += 1
-        listener.removed(path, count)
-
-    return count
-
-#------------------------------------------------------------------------------
-
 def updateFiles(directory, updateURL, listener,
                 manifest, modifiedAndNew, removed, localRemoved):
@@ -338,9 +314,4 @@
         updateURL += "/" + os.name
 
-        removeCount = 0
-        if localRemoved:
-            removeCount = removeFiles(directory, listener,
-                                      localRemoved, removeCount)
-        
         for (path, size, sum) in modifiedAndNew:
             targetFile = createLocalPath(directory, path)
@@ -375,6 +346,21 @@
             count += 1
             listener.renamed(path, count)
-
-        removeFiles(directory, listener, removed, removeCount)
+        
+        listener.startRemoving()
+        count = 0
+        removed += localRemoved
+        removed.sort(reverse = True)
+        for path in removed:            
+            removePath = createLocalPath(directory, path)
+            removeFile(toremoveDir, directory, removePath)
+
+            removeDirectory = os.path.dirname(removePath)
+            try:
+                os.removedirs(removeDirectory)
+            except:
+                pass
+
+            count += 1
+            listener.removed(path, count)
 
         listener.writingManifest()
Index: src/mlx/util.py
===================================================================
--- src/mlx/util.py	(revision 401)
+++ src/mlx/util.py	(revision 784)
@@ -170,6 +170,13 @@
 
 _utf8decoder = codecs.getdecoder("utf-8")
+_latin2decoder = codecs.getdecoder("iso8859-2")
 
 def utf2unicode(text):
     """Convert the given text from UTF-8 encoding to unicode."""
-    return unicode(_utf8decoder(text)[0])
+    try:
+        return unicode(_utf8decoder(text)[0])
+    except:
+        try:
+            return unicode(_latin2decoder(text)[0])
+        except:
+            return unicode(list(text))
Index: src/mlx/web.py
===================================================================
--- src/mlx/web.py	(revision 771)
+++ src/mlx/web.py	(revision 746)
@@ -2,5 +2,4 @@
 import const
 import util
-from rpc import Registration
 import rpc
 import rpccommon
@@ -91,7 +90,4 @@
                       const.AIRCRAFT_B462  : "146" }
 
-    checkFlightTypes = [ const.AIRCRAFT_B736, const.AIRCRAFT_B737,
-                         const.AIRCRAFT_B738, const.AIRCRAFT_DH8D ]
-
     @staticmethod
     def getDateTime(date, time):
@@ -99,36 +95,4 @@
         return datetime.datetime.strptime(date + " " + time,
                                           "%Y-%m-%d %H:%M:%S")
-
-    @staticmethod
-    def forCheckFlight(aircraftType):
-        """Create a booked flight for a check flight with the given aircraft
-        type."""
-        flight = BookedFlight()
-
-        flight.departureICAO = "LHBP"
-        flight.arrivalICAO = "LHBP"
-
-        flight.aircraftType = aircraftType
-        flight.aircraftTypeName = BookedFlight.TYPE2TYPECODE[aircraftType]
-
-        # FIXME: perhaps find one for the type
-        flight.tailNumber = "HA-CHK"
-        flight.callsign = "HA-CHK"
-
-        flight.numPassengers = 0
-        flight.numCrew = 2
-        flight.bagWeight = 0
-        flight.cargoWeight = 0
-        flight.mailWeight = 0
-        flight.route = "DCT"
-
-        t = datetime.datetime.now() + datetime.timedelta(minutes = 20)
-        flight.departureTime = datetime.datetime(t.year, t.month, t.day,
-                                                 t.hour, t.minute)
-        t = flight.departureTime + datetime.timedelta(minutes = 30)
-        flight.arrivalTime = datetime.datetime(t.year, t.month, t.day,
-                                               t.hour, t.minute)
-
-        return flight
 
     def __init__(self, id = None):
@@ -659,40 +623,9 @@
 #------------------------------------------------------------------------------
 
-class Register(RPCRequest):
-    """A registration request."""
-    def __init__(self, client, callback, registrationData):
-        """Construct the request."""
-        super(Register, self).__init__(client, callback)
-        self._registrationData = registrationData
-
-    def run(self):
-        """Perform the registration."""
-
-        registrationData = self._registrationData
-
-        (resultCode, pilotID) = self._client.register(registrationData)
-        result = Result()
-        result.registered = resultCode==rpc.Client.RESULT_OK
-        if result.registered:
-            result.pilotID = pilotID
-
-            self._client.setCredentials(pilotID, registrationData.password)
-            LoginRPC.setupLoginResult(result, self._client, pilotID,
-                                      registrationData.password)
-
-        result.invalidData = \
-          resultCode==rpc.Client.RESULT_INVALID_DATA
-        result.emailAlreadyRegistered = \
-          resultCode==rpc.Client.RESULT_EMAIL_ALREADY_REGISTERED
-
-        return result
-
-#------------------------------------------------------------------------------
-
 class Login(Request):
     """A login request."""
     iso88592decoder = codecs.getdecoder("iso-8859-2")
 
-    def __init__(self, callback, pilotID, password):
+    def __init__(self, callback, pilotID, password, entranceExam):
         """Construct the login request with the given pilot ID and
         password."""
@@ -701,4 +634,5 @@
         self._pilotID = pilotID
         self._password = password
+        self._entranceExam = entranceExam
 
     def run(self):
@@ -712,29 +646,43 @@
         password = md5.hexdigest()
 
-        url = MAVA_BASE_URL + "/leker2.php?pid=%s&psw=%s" %  (pilotID, password)
+        if self._entranceExam:
+            url = MAVA_BASE_URL + "/ellenorzo/getflightplan.php?pid=%s" % \
+                  (pilotID,)
+        else:
+            url = MAVA_BASE_URL + "/leker2.php?pid=%s&psw=%s" % \
+                  (pilotID, password)
 
         result = Result()
+        result.entranceExam = self._entranceExam
 
         f = urllib2.urlopen(url, timeout = 10.0)
 
         status = readline(f)
-        result.loggedIn = status == ".OK."
+        if self._entranceExam:
+            result.loggedIn = status != "#NOEXAM"
+        else:
+            result.loggedIn = status == ".OK."
 
         if result.loggedIn:
             result.pilotID = self._pilotID
             result.password = self._password
-            result.rank = "FO"
             result.flights = []
-
-            result.pilotName = self.iso88592decoder(readline(f))[0]
-            result.exams = readline(f)
-
-            while True:
-                line = readline(f)
-                if not line or line == "#ENDPIREP": break
-
-                flight = BookedFlight(line)
-                flight.readFromWeb(f)
-                result.flights.append(flight)
+            # FIXME: this may not be the correct behaviour
+            # for an entrance exam, but the website returns
+            # an error
+            if self._entranceExam:
+                result.pilotName = result.pilotID
+                result.exams = ""
+            else:
+                result.pilotName = self.iso88592decoder(readline(f))[0]
+                result.exams = readline(f)
+
+                while True:
+                    line = readline(f)
+                    if not line or line == "#ENDPIREP": break
+
+                    flight = BookedFlight(line)
+                    flight.readFromWeb(f)
+                    result.flights.append(flight)
 
             result.flights.sort(cmp = lambda flight1, flight2:
@@ -750,25 +698,5 @@
 class LoginRPC(RPCRequest):
     """An RPC-based login request."""
-    @staticmethod
-    def setupLoginResult(result, client, pilotID, password):
-        """Setup the login result with the given client, pilot ID and
-        password."""
-        loginResult = client.login()
-        result.loggedIn = loginResult is not None
-        if result.loggedIn:
-            result.pilotID = pilotID
-            result.pilotName = loginResult[0]
-            result.rank = loginResult[1]
-            result.password = password
-            result.flights = client.getFlights()
-            if result.rank=="STU":
-                reply = client.getEntryExamStatus()
-                result.entryExamPassed = reply[0]
-                result.entryExamLink = reply[1]
-                result.checkFlightStatus = reply[2]
-                if reply[3]:
-                    result.rank = "FO"
-
-    def __init__(self, client, callback, pilotID, password):
+    def __init__(self, client, callback, pilotID, password, entranceExam):
         """Construct the login request with the given pilot ID and
         password."""
@@ -777,33 +705,20 @@
         self._pilotID = pilotID
         self._password = password
+        self._entranceExam = entranceExam
 
     def run(self):
         """Perform the login request."""
         result = Result()
+        # FIXME: handle the entrance exam case
+        result.entranceExam = self._entranceExam
 
         self._client.setCredentials(self._pilotID, self._password)
-        LoginRPC.setupLoginResult(result, self._client,
-                                  self._pilotID, self._password)
-
-        return result
-
-#------------------------------------------------------------------------------
-
-class GetEntryExamStatus(RPCRequest):
-    """A request to get the entry exam status."""
-    def __init__(self, client, callback):
-        """Construct the request."""
-        super(GetEntryExamStatus, self).__init__(client, callback)
-
-    def run(self):
-        """Perform the query."""
-        result = Result()
-
-        reply = self._client.getEntryExamStatus()
-
-        result.entryExamPassed = reply[0]
-        result.entryExamLink = reply[1]
-        result.checkFlightStatus = reply[2]
-        result.madeFO = reply[3]
+        pilotName = self._client.login()
+        result.loggedIn = pilotName is not None
+        if result.loggedIn:
+            result.pilotID = self._pilotID
+            result.pilotName = pilotName
+            result.password = self._password
+            result.flights = self._client.getFlights()
 
         return result
@@ -1201,19 +1116,4 @@
 #------------------------------------------------------------------------------
 
-class SetCheckFlightPassed(RPCRequest):
-    """A request to mark the user as one having passed the check flight."""
-    def __init__(self, client, callback, aircraftType):
-        """Construct the request for the given type."""
-        super(SetCheckFlightPassed, self).__init__(client, callback)
-        self._aircraftType = aircraftType
-
-    def run(self):
-        """Perform the update."""
-        aircraftType = BookedFlight.TYPE2TYPECODE[self._aircraftType]
-        self._client.setCheckFlightPassed(aircraftType)
-        return Result()
-
-#------------------------------------------------------------------------------
-
 class Handler(threading.Thread):
     """The handler for the web services.
@@ -1234,19 +1134,12 @@
             self._rpcClient.setCredentials(config.pilotID, config.password)
 
-    def register(self, callback, registrationData):
-        """Enqueue a registration request."""
-        self._addRequest(Register(self._rpcClient, callback, registrationData))
-
-    def login(self, callback, pilotID, password):
+    def login(self, callback, pilotID, password, entranceExam = False):
         """Enqueue a login request."""
         request = \
-          LoginRPC(self._rpcClient, callback, pilotID, password) \
-          if self._config.useRPC else Login(callback, pilotID, password)
+          LoginRPC(self._rpcClient, callback, pilotID, password, entranceExam) \
+          if self._config.useRPC and not entranceExam \
+          else Login(callback, pilotID, password, entranceExam)
 
         self._addRequest(request)
-
-    def getEntryExamStatus(self, callback):
-        """Get the entry exam status."""
-        self._addRequest(GetEntryExamStatus(self._rpcClient, callback))
 
     def getFleet(self, callback):
@@ -1292,9 +1185,4 @@
         self._addRequest(SendBugReport(callback, summary, description, email))
 
-    def setCheckFlightPassed(self, callback, aircraftType):
-        """Mark the check flight as passed."""
-        self._addRequest(SetCheckFlightPassed(self._rpcClient,
-                                              callback, aircraftType))
-
     def run(self):
         """Process the requests."""
