 {
   gslc_tsElemRef* pElemRef = NULL;
 
-//<InitGUI !Start!>
-  gslc_PageAdd(&m_gui,E_PG_MAIN,m_asPageElem,MAX_ELEM_PG_MAIN_RAM,m_asPageElemRef,MAX_ELEM_PG_MAIN);
-  
+  //<InitGUI !Start!>
+  gslc_PageAdd(&m_gui, E_PG_MAIN, m_asPageElem, MAX_ELEM_PG_MAIN_RAM, m_asPageElemRef, MAX_ELEM_PG_MAIN);
+
   // Background flat color
-  gslc_SetBkgndColor(&m_gui,GSLC_COL_GRAY_DK3);
+  gslc_SetBkgndColor(&m_gui, GSLC_COL_GRAY_DK3);
 
   // -----------------------------------
   // PAGE: E_PG_MAIN
-   
+
   // Create wrapping box for textbox E_LISTBOX and scrollbar
   gslc_tsRect rList = (gslc_tsRect) { 17, 75, 200, 100 };
   pElemRef = gslc_ElemCreateBox(&m_gui, GSLC_ID_AUTO, E_PG_MAIN, rList);
-  gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_GRAY,GSLC_COL_BLACK,GSLC_COL_BLACK);
-  
+  gslc_ElemSetCol(&m_gui, pElemRef, GSLC_COL_GRAY, GSLC_COL_BLACK, GSLC_COL_BLACK);
+
   // Create listbox
   // - Establish storage for listbox
   // - Note that XLISTBOX_BUF_OH_R is extra required per item to
   //   accommodate GUI metadata
-  static uint8_t m_pXListboxBuf[COUNTRY_CNT*(COUNTRY_LEN+XLISTBOX_BUF_OH_R)];
+  static uint8_t m_pXListboxBuf[COUNTRY_CNT*(COUNTRY_LEN + XLISTBOX_BUF_OH_R)];
   pElemRef = gslc_ElemXListboxCreate(&m_gui, E_LISTBOX, E_PG_MAIN, &m_sListbox,
-    (gslc_tsRect){rList.x+2,rList.y+4,rList.w-23,rList.h-7}, E_FONT_LISTBOX,
+    (gslc_tsRect) { rList.x + 2, rList.y + 4, rList.w - 23, rList.h - 7 }, E_FONT_LISTBOX,
     m_pXListboxBuf, sizeof(m_pXListboxBuf), 0);
   gslc_ElemXListboxItemsSetSize(&m_gui, pElemRef, XLISTBOX_SIZE_AUTO, XLISTBOX_SIZE_AUTO);
-  gslc_ElemXListboxSetSize(&m_gui,pElemRef,5,1); // 5 rows, 1 column
-  gslc_ElemXListboxItemsSetTxtMargin(&m_gui, pElemRef,5, 12); // Adjust for font baseline
-  gslc_ElemXListboxSetSelFunc(&m_gui, pElemRef, &CbListBox);  
+  gslc_ElemXListboxSetSize(&m_gui, pElemRef, 5, 1); // 5 rows, 1 column
+  gslc_ElemXListboxItemsSetTxtMargin(&m_gui, pElemRef, FONT_MARGIN_X, FONT_MARGIN_Y); // Adjust for font baseline
+  gslc_ElemXListboxSetSelFunc(&m_gui, pElemRef, &CbListBox);
   gslc_ElemSetFrameEn(&m_gui, pElemRef, true);
-  gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_GRAY, GSLC_COL_BLACK, GSLC_COL_BLUE_DK3);
+  gslc_ElemSetCol(&m_gui, pElemRef, GSLC_COL_GRAY, GSLC_COL_BLACK, GSLC_COL_BLUE_DK3);
   gslc_ElemSetTxtCol(&m_gui, pElemRef, GSLC_COL_BLUE_LT3);
   gslc_ElemSetGlowCol(&m_gui, pElemRef, GSLC_COL_GRAY, GSLC_COL_BLUE_DK3, GSLC_COL_WHITE);
   m_pElemListbox = pElemRef;
 
   // Create vertical scrollbar for textbox
-  pElemRef = gslc_ElemXSliderCreate(&m_gui,E_SCROLL,E_PG_MAIN,&m_sXSlider[0],
-    (gslc_tsRect){rList.x+(int16_t)rList.w-21,rList.y+4,20,rList.h-8},0,COUNTRY_CNT-1,0,5,true);
-  gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE_LT1,GSLC_COL_BLACK,GSLC_COL_BLACK);
-  gslc_ElemXSliderSetStyle(&m_gui,pElemRef,true,GSLC_COL_BLUE_DK1,0,0,GSLC_COL_BLACK);
-  gslc_ElemXSliderSetPosFunc(&m_gui,pElemRef,&CbSlidePos);
+  pElemRef = gslc_ElemXSliderCreate(&m_gui, E_SCROLL, E_PG_MAIN, &m_sXSlider[0],
+    (gslc_tsRect) { rList.x + (int16_t)rList.w - 21, rList.y + 4, 20, rList.h - 8 }, 0, COUNTRY_CNT - 1, 0, 5, true);
+  gslc_ElemSetCol(&m_gui, pElemRef, GSLC_COL_BLUE_LT1, GSLC_COL_BLACK, GSLC_COL_BLACK);
+  gslc_ElemXSliderSetStyle(&m_gui, pElemRef, true, GSLC_COL_BLUE_DK1, 0, 0, GSLC_COL_BLACK);
+  gslc_ElemXSliderSetPosFunc(&m_gui, pElemRef, &CbSlidePos);
 
   // Create GSLC_ID_AUTO text label
-  pElemRef = gslc_ElemCreateTxt(&m_gui,GSLC_ID_AUTO,E_PG_MAIN,(gslc_tsRect){15,45,100,25},
-    (char*)"Country Code:",0,E_FONT_TXT);
-  gslc_ElemSetTxtAlign(&m_gui,pElemRef,GSLC_ALIGN_MID_MID);
-  gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_YELLOW);
-  gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLACK,GSLC_COL_GRAY_DK3,GSLC_COL_BLACK);
+  pElemRef = gslc_ElemCreateTxt(&m_gui, GSLC_ID_AUTO, E_PG_MAIN, (gslc_tsRect) { 15, 45, 100, 25 },
+    (char*)"Country Code:", 0, E_FONT_TXT);
+  gslc_ElemSetTxtAlign(&m_gui, pElemRef, GSLC_ALIGN_MID_MID);
+  gslc_ElemSetTxtCol(&m_gui, pElemRef, GSLC_COL_YELLOW);
+  gslc_ElemSetCol(&m_gui, pElemRef, GSLC_COL_BLACK, GSLC_COL_GRAY_DK3, GSLC_COL_BLACK);
 
   static char mstr2[20] = "US"; // FIXME
-  pElemRef = gslc_ElemCreateTxt(&m_gui, GSLC_ID_AUTO, E_PG_MAIN, (gslc_tsRect) {125,45,55,25},
+  pElemRef = gslc_ElemCreateTxt(&m_gui, GSLC_ID_AUTO, E_PG_MAIN, (gslc_tsRect) { 125, 45, 55, 25 },
     mstr2, sizeof(mstr2), E_FONT_TXT);
-  gslc_ElemSetTxtAlign(&m_gui,pElemRef,GSLC_ALIGN_MID_MID);
+  gslc_ElemSetTxtAlign(&m_gui, pElemRef, GSLC_ALIGN_MID_MID);
   gslc_ElemSetTxtCol(&m_gui, pElemRef, GSLC_COL_ORANGE);
-  gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLACK,GSLC_COL_GRAY_DK3,GSLC_COL_BLACK);
+  gslc_ElemSetCol(&m_gui, pElemRef, GSLC_COL_BLACK, GSLC_COL_GRAY_DK3, GSLC_COL_BLACK);
   m_pElemSel = pElemRef; // Save for quick access
 
   // Create GSLC_ID_AUTO text label
-  pElemRef = gslc_ElemCreateTxt(&m_gui,GSLC_ID_AUTO,E_PG_MAIN,(gslc_tsRect){10,20,200,25},
-    (char*)"Country Chooser",0,E_FONT_TITLE);
-  gslc_ElemSetTxtAlign(&m_gui,pElemRef,GSLC_ALIGN_MID_MID);
-  gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_YELLOW);
-  gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLACK,GSLC_COL_GRAY_DK3,GSLC_COL_BLACK);
+  pElemRef = gslc_ElemCreateTxt(&m_gui, GSLC_ID_AUTO, E_PG_MAIN, (gslc_tsRect) { 10, 20, 200, 25 },
+    (char*)"Country Chooser", 0, E_FONT_TITLE);
+  gslc_ElemSetTxtAlign(&m_gui, pElemRef, GSLC_ALIGN_MID_MID);
+  gslc_ElemSetTxtCol(&m_gui, pElemRef, GSLC_COL_YELLOW);
+  gslc_ElemSetCol(&m_gui, pElemRef, GSLC_COL_BLACK, GSLC_COL_GRAY_DK3, GSLC_COL_BLACK);
 
   // Create E_BTN_QUIT button with text label
-  pElemRef = gslc_ElemCreateBtnTxt(&m_gui,E_BTN_QUIT,E_PG_MAIN,
-    (gslc_tsRect){217-60,190,60,30},(char*)"OK",0,E_FONT_TXT,&CbBtnCommon);
-  gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_GREEN_DK2,GSLC_COL_GREEN_DK4,GSLC_COL_GREEN_DK1);
-  gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_WHITE);
-  
+  pElemRef = gslc_ElemCreateBtnTxt(&m_gui, E_BTN_QUIT, E_PG_MAIN,
+    (gslc_tsRect) { 217 - 60, 190, 60, 30 }, (char*)"OK", 0, E_FONT_TXT, &CbBtnCommon);
+  gslc_ElemSetCol(&m_gui, pElemRef, GSLC_COL_GREEN_DK2, GSLC_COL_GREEN_DK4, GSLC_COL_GREEN_DK1);
+  gslc_ElemSetTxtCol(&m_gui, pElemRef, GSLC_COL_WHITE);
+
   return true;
 }
 


  gslc_InitDebug(&DebugOut);

  if (!gslc_Init(&m_gui,&m_drv,m_asPage,MAX_PAGE,m_asFont,MAX_FONT)) { return; }
  
  // ------------------------------------------------
  // Load Fonts
  // ------------------------------------------------
    if (!gslc_FontAdd(&m_gui,E_FONT_TITLE,GSLC_FONTREF_PTR,&FreeSans9pt7b,1)) { return; }
    if (!gslc_FontAdd(&m_gui,E_FONT_LISTBOX,GSLC_FONTREF_PTR,&FreeMono9pt7b,1)) { return; }
    if (!gslc_FontAdd(&m_gui,E_FONT_TXT,GSLC_FONTREF_PTR,&FreeSans9pt7b,1)) { return; }

  // ------------------------------------------------
  // Create graphic elements

#include "elem/XListbox.h"
#include "elem/XSlider.h"

// Determine whether to load Adafruit-GFX extra fonts or Teensy fonts
// - And also define any positioning adjustment in the listbox to
//   account for the font's baseline. Future releases may attempt
//   to auto-detect this adjustment.
#if defined(DRV_DISP_ADAGFX_ILI9341_T3)
#define FONTS_T3
#define FONT_MARGIN_X 2
#define FONT_MARGIN_Y 4
#else
#define FONT_MARGIN_X 5
#define FONT_MARGIN_Y 12  
#endif

// ------------------------------------------------
// Load specific fonts
// ------------------------------------------------
#if defined(FONTS_T3)
  // Teensy fonts
  #include <font_Arial.h>
#else
  // Otherwise load extra Adafruit-GFX fonts
  #include <Adafruit_GFX.h>
  #include <gfxfont.h>

  // Note that font files are located within the Adafruit-GFX library folder:
  #include "Fonts/FreeMono9pt7b.h"
  #include "Fonts/FreeSans9pt7b.h"
#endif

// ------------------------------------------------
// Defines for resources
