(function(N) {
    N.Ready = function(opts) {
        var self = this;

        $('#faq').popover({
            title: 'What is this?',
            content: 'This is a demonstration app using new real-time flight data from the airport.  Enter your flight and address and it will monitor travel times and flight updates to alert you when you need to leave.'
        }); 
        self.server = 'http://54.235.132.110/';
        self.map = new Map();

        var socket = io.connect(self.server);

        socket.on('update', function(data) {
            if (self.flight && data) {
                self.flight.set(data);
                console.log('socket update');
                console.log(data);
            }
        });

        self.map.on('route-time-update', function(route) {
            $('#addr').val(route.start_address);
            self.flight.set('travelTime', route.duration.value / 60);
            console.log(route);
        });

        $('#go').click(function() {
            self.fn = $('#flight-num').val();
            self.direction = $('#direction').val() || "Arrival";

            $.getJSON(self.server + 'number/' + self.fn + '?callback=?', function(status) {
                if (status.length === 0) {
                    alert("Sorry, couldn't find that flight.");
                    return;
                }
                if (status.length > 1) {
                    if (self.chooser) self.chooser.undelegateEvents();
                    self.flights = new Flights(status),
                    self.chooser = new FlightChooser({
                        collection: self.flights,
                        $list: $('.modal-body div')
                    }); 

                    self.chooser.on('selected', watchFlight, this);
                } else {
                    watchFlight(status[0]);
                }

                function watchFlight(fs) {
                    self.flight = new Flight(fs);
                    self.flightStatus = new FlightStatus({ model: self.flight });
                    self.flightProgress = new FlightProgress({
                        model: self.flight, id: '.progress-bar'
                    });
                    self.map.calculateRoute();
                }
            });
        });

        socket.emit('subscribe', {
            "flightNumber": self.fn, 
            "direction": self.direction
        });


    
    };
}(this));

@@ -349,17 +349,50 @@
  leave.'
+,%0A            placement: 'bottom'
 %0A
-
         
@@ -649,89 +649,8 @@
 a);%0A
-                console.log('socket update');%0A                console.log(data);%0A
     
@@ -854,40 +854,8 @@
 0);%0A
-            console.log(route);%0A
     
@@ -895,24 +895,24 @@
 unction() %7B%0A
+
             
@@ -948,73 +948,8 @@
 l();
-%0A            self.direction = $('#direction').val() %7C%7C %22Arrival%22;
 %0A%0A  
@@ -2071,33 +2071,16 @@
 oute();%0A
-                %7D
 %0A       
@@ -2087,26 +2087,9 @@
     
- %7D);%0A
  
-       %7D);%0A%0A
     
@@ -2131,16 +2131,28 @@
         
+         
+   
 %22flightN
@@ -2181,16 +2181,28 @@
         
+           
+ 
 %22directi
@@ -2206,20 +2206,18 @@
 ction%22: 
-sel
 f
+s
 .directi
@@ -2231,18 +2231,69 @@
     
-%7D);%0A%0A%0A    
+            %7D);%0A                %7D%0A            %7D);%0A        %7D);
 %0A   

Fix bug, was subscribing to dead socket