 err);
                    });
                };

                /**
                 * Triggered once a connection has been achieved.
                 * Defines callbacks to handle incoming data and connection events.
                 */
                function ready() {
                    conn.on('data', function (data) {
                        console.log("Data recieved");
                        var cueString = "<span class=\"cueMsg\">Cue: </span>";
                        switch (data) {
         