 static uint8_t midiOut_buff[MAX_TX_BUFF];
 static uint8_t midiOut_buff_len = 0;
 
-
-
 /*******************************************************************************
 * Send MIDI data to BLE Stack
 *
 * BLE Packet is capped to 17 bytes (2 bytes prefix + 3 bytes MIDI + 3 * 4 bytes)
 *
 * Right now this is periodically called by the app_timer, to make sure the buffer clears
-* out fast enough as calling this through MIDI_poll() caused more delay. 
+* out fast enough as calling this through MIDI_poll() caused more delay.
 * TO DO: Use MIDI Structs instead of byte array
 *
 *******************************************************************************/
 void m_uart_rx_handle(void * p_context)
 {
-  if(rx_buf_num > 0 && isConnected) {
- int bufInc = 0;
- 
- // with every ticker-call to this function we take 17 bytes off the buffer and send it out to BLE
- if (rx_buf_num < 17) {
-    bufInc = rx_buf_num % 17; 
-  }
- else { 
-    bufInc = 17; 
- }
-  ble.updateCharacteristicValue(txCharacteristic.getHandle(), rx_buf, bufInc);
-  memmove(rx_buf, rx_buf+bufInc, rx_buf_num-bufInc); // probably not best practice, needs to be fixed
-  rx_buf_num -= bufInc;
-  rx_state = 0;
-  }
+if(rx_buf_num > 0 && isConnected) 
+{
+	 int bufInc = 0;
+
+	 // with every ticker-call to this function we take 17 bytes off the buffer and send it out to BLE
+	 if (rx_buf_num < 17) 
+	 {
+	    bufInc = rx_buf_num % 17;
+	 }
+	 else 
+	 {
+		 bufInc = 17;
+	 }
+	  ble.updateCharacteristicValue(txCharacteristic.getHandle(), rx_buf, bufInc);
+	  memmove(rx_buf, rx_buf+bufInc, rx_buf_num-bufInc); // probably not best practice, needs to be fixed
+	  rx_buf_num -= bufInc;
+	  rx_state = 0;
+}
 }
 
 /*******************************************************************************
 * Connection callback
-* 
+*
 *  TO DO:
 * - Probably doesnt need Serial.Read() here since we dont do any reading
 *

  Usb.Task();
  usbstate = Usb.getUsbTaskState();

  if (usbstate != laststate) {
    laststate = usbstate;

    switch (usbstate) {

/*******************************************************************************
 * Convert MIDI Data to MIDI-BLE Packets
 *
 * TO DO:
 * - Jitter / Time Coding is not yet implemented
 * - 1 Byte between MIDI Packet is time-offset currently ignored
 * - Move this to proper MIDI Parsing (e.g. SysEx)
