diff --git a/sc_basic.module b/sc_basic.module
index a820609..cf4f240 100755
--- a/sc_basic.module
+++ b/sc_basic.module
@@ -1,8 +1,12 @@
 <?php
 
+/**
+ * @file
+ * This file contains base scripts for the Shortcode Library: Basic Tags module
+ */
 
 /**
- * Implementation of hook_preprocess_page().
+ * Implements hook_preprocess_page().
  */
 function sc_basic_preprocess_page(&$variables) {
   $path = drupal_get_path('module', 'sc_basic');
@@ -10,9 +14,9 @@ function sc_basic_preprocess_page(&$variables) {
 }
 
 /**
-* Implementation of hook_shortcode_info().
-* Using same formatting as hook_filter_info()
-*/
+ * Implements hook_shortcode_info().
+ * Using same formatting as hook_filter_info()
+ */
 function sc_basic_shortcode_info() {
   $shortcodes = array();
 
@@ -113,21 +117,26 @@ function sc_basic_shortcode_info() {
     'attributes callback' => 'sc_basic_toggle_attributes',
   );
 
-  // $shortcodes['tabs'] = array(
-  //   'title' => t('Tabs & Accordeons'),
-  //   'description' => t('JQuery toggle content'),
-  //   'process callback' => 'sc_basic_tabs',
-  //   'tips callback' => 'sc_basic_tabs_tips',
-  //   'default settings' => array(),
-  // );
-
-  // $shortcodes['tab-item'] = array(
-  //   'title' => t('Tabs pane'),
-  //   'description' => t('converts inner contents to a tab.'),
-  //   'process callback' => 'sc_basic_tab_item',
-  //   'tips callback' => 'sc_basic_tab_item_tips',
-  //   'default settings' => array(),
-  // );
+
+  /*
+  $shortcodes['tabs'] = array(
+    'title' => t('Tabs & Accordeons'),
+    'description' => t('JQuery toggle content'),
+    'process callback' => 'sc_basic_tabs',
+    'tips callback' => 'sc_basic_tabs_tips',
+    'default settings' => array(),
+  );
+  */
+
+  /*
+  $shortcodes['tab-item'] = array(
+    'title' => t('Tabs pane'),
+    'description' => t('converts inner contents to a tab.'),
+    'process callback' => 'sc_basic_tab_item',
+    'tips callback' => 'sc_basic_tab_item_tips',
+    'default settings' => array(),
+  );
+  */
 
   $shortcodes['icon-list'] = array(
     'title' => t('Icon list'),
@@ -145,18 +154,16 @@ function sc_basic_shortcode_info() {
  * Shortcode defenitions
  */
 
- /*============================================================================================*/
-/* Contact_info Shortcode
-/*============================================================================================*/
+/**
+ * Contact_info Shortcode
+ */
 
 /**
- *
  * Display contact information such as Name, Email, ...
- * @param $attrs
- * @param $content
+ *
  */
+function sc_basic_contact($attrs, $content = NULL) {
 
-function sc_basic_contact($attrs, $content = null) {
   extract(shortcode_attrs(array(
     'fullname' => '',
     'address' => '',
@@ -171,31 +178,71 @@ function sc_basic_contact($attrs, $content = null) {
 
   $items = array();
   $full_address = array();
-  if ($fullname) $full_address[] = $fullname;
-  if ($address) $full_address[] = $address;
-  if ($city) $full_address[] = $city;
-  if ($state) $full_address[] = $state;
-  if ($zip) $full_address[] = $zip;
-  if ($country) $full_address[] = $country;
-  $items[] = array('data' => implode(', ', $full_address), 'class' => array('address'));
-  if ($phone) $items[] = array('data' => $phone, 'class' => array('phone'));
-  if ($email) $items[] = array('data' => $email, 'class' => array('email'));
+
+  if ($fullname) {
+    $full_address[] = $fullname;
+  }
+
+  if ($address) {
+    $full_address[] = $address;
+  }
+
+  if ($city) {
+    $full_address[] = $city;
+  }
+
+  if ($state) {
+    $full_address[] = $state;
+  }
+
+  if ($zip) {
+    $full_address[] = $zip;
+  }
+
+  if ($country) {
+    $full_address[] = $country;
+  }
+
+  $items[] = array(
+    'data' => implode(', ', $full_address),
+    'class' => array('address'),
+  );
+
+  if ($phone) {
+    $items[] = array(
+      'data' => $phone,
+      'class' => array('phone'),
+    );
+  }
+
+  if ($email) {
+    $items[] = array(
+      'data' => $email,
+      'class' => array('email'),
+    );
+  }
 
   return theme('item_list',
     array(
       'items' => $items,
       'title' => NULL,
       'type' => 'ul',
-      'attributes' => array('class' => array('contact-info'))
+      'attributes' => array('class' => array('contact-info')),
     )
   );
 }
 
+/**
+ * Tips callback for contact shortcode.
+ */
 function sc_basic_contact_tips($format, $long) {
   $output = '[contact fullname="John Smith" address="Park lane 5" city="LA" state="California" zip="12345" phone="555-55-555" email="info@example.com"][/contact]';
   return $output;
 }
 
+/**
+ * Attributes callback for contact shortcode.
+ */
 function sc_basic_contact_attributes($form, $form_state) {
   $form['fullname'] = array(
     '#type' => 'textfield',
@@ -277,7 +324,10 @@ function sc_basic_contact_attributes($form, $form_state) {
   return $form;
 }
 
-function sc_basic_social($attrs, $content = null) {
+/**
+ * Render function for social shortcode.
+ */
+function sc_basic_social($attrs, $content = NULL) {
   $attributes = array();
   $icon_path = drupal_get_path('module', 'sc_basic') . '/styling/icons/social/mono';
   $files = file_scan_directory($icon_path, '/\.(jpg|gif|png?)$/');
@@ -303,27 +353,38 @@ function sc_basic_social($attrs, $content = null) {
       $text = FALSE;
     }
     $link = explode('|', $content);
-    $items[] = array('data' => l($text, $url), 'class' => array($name), 'title' => ucfirst($name));
+    $items[] = array(
+      'data' => l($text, $url),
+      'class' => array($name),
+      'title' => ucfirst($name),
+    );
   }
 
   $classes = array('social-links');
-  if (isset($type)) $classes[] = $type;
-
+  if (isset($type)) {
+    $classes[] = $type;
+  }
   return theme('item_list',
     array(
       'items' => $items,
       'title' => NULL,
       'type' => 'ul',
-      'attributes' => array('class' => $classes)
+      'attributes' => array('class' => $classes),
     )
   );
 }
 
+/**
+ * Tips callback for social shortcode.
+ */
 function sc_basic_social_tips($format, $long) {
   $output = '[social type="inline" Skype="http://google.com" Twitter="http://google.com" Facebook="http://google.com" Drupal="http://google.com"][/social]';
   return $output;
 }
 
+/**
+ * Attributes callback for social attributes.
+ */
 function sc_basic_social_attributes($form, $form_state) {
   $icon_path = drupal_get_path('module', 'sc_basic') . '/styling/icons/social/mono';
   $files = file_scan_directory($icon_path, '/\.(jpg|gif|png?)$/');
@@ -357,10 +418,10 @@ function sc_basic_social_attributes($form, $form_state) {
   return $form;
 }
 
-/*============================================================================================*/
-/* Columns
-/*============================================================================================*/
-function sc_basic_columns( $attrs, $content = null ) {
+/**
+ * Render function for columns shortcode.
+ */
+function sc_basic_columns($attrs, $content = NULL) {
   extract(shortcode_attrs(array(
   'width'      => '',
   'align'      => '',
@@ -370,11 +431,21 @@ function sc_basic_columns( $attrs, $content = null ) {
   ), $attrs));
 
   $classes = array();
-  if ($last) $classes[] = 'col-last';
-  if ($width) $classes[] = 'col-' . $width;
-  if ($align == 'right') $classes[] = 'float-right';
-  if ($align == 'center') $classes[] = 'align-center';
-  if ($clear) $classes[] = 'clear-both';
+  if ($last) {
+    $classes[] = 'col-last';
+  }
+  if ($width) {
+    $classes[] = 'col-' . $width;
+  }
+  if ($align == 'right') {
+    $classes[] = 'float-right';
+  }
+  if ($align == 'center') {
+    $classes[] = 'align-center';
+  }
+  if ($clear) {
+    $classes[] = 'clear-both';
+  }
 
   $classes = trim(implode(' ', $classes));
 
@@ -382,14 +453,16 @@ function sc_basic_columns( $attrs, $content = null ) {
 }
 
 /**
- * Columns
+ * Tips callback for columns shortcode.
  */
-
 function sc_basic_columns_tips($format, $long) {
   $output = '[col width="1-2"]your[/col][col width="1-2" last=1]content[/col]';
   return $output;
 }
 
+/**
+ * Attributes callback for columns shortcode.
+ */
 function sc_basic_columns_attributes($form, $form_state) {
   $form['width'] = array(
     '#type' => 'select',
@@ -463,34 +536,53 @@ function sc_basic_columns_attributes($form, $form_state) {
 }
 
 /**
- * Drop shadows
+ * Render function for drop shadows shortcode.
  */
-
-function sc_basic_dropshadow( $attrs, $content = null ) {
+function sc_basic_dropshadow($attrs, $content = NULL) {
   extract(shortcode_attrs(array(
   'type'      => '',
   ), $attrs));
 
   $classes = array();
   $classes[] = 'dropshadow';
-  if ($type == '') $classes[] = 'raised';
-  if ($type == 2) $classes[] = 'perspective';
-  if ($type == 3) $classes[] = 'lifted';
-  if ($type > 3) $classes[] = 'curved';
-  if ($type == 4) $classes[] = 'curved-hz1';
-  if ($type == 5) $classes[] = 'curved-hz2';
-  if ($type == 6) $classes[] = 'curved-vt2';
+  if ($type == '') {
+    $classes[] = 'raised';
+  }
+  if ($type == 2) {
+    $classes[] = 'perspective';
+  }
+  if ($type == 3) {
+    $classes[] = 'lifted';
+  }
+  if ($type > 3) {
+    $classes[] = 'curved';
+  }
+  if ($type == 4) {
+    $classes[] = 'curved-hz1';
+  }
+  if ($type == 5) {
+    $classes[] = 'curved-hz2';
+  }
+  if ($type == 6) {
+    $classes[] = 'curved-vt2';
+  }
 
   $classes = trim(implode(' ', $classes));
 
   return '<div class="' . $classes . '">' . $content . '</div>';
 }
 
+/**
+ * Tips callback for dropshadow shortcode.
+ */
 function sc_basic_dropshadow_tips($format, $long) {
   $output = '[dropshadow]your content[/dropshadow]';
   return $output;
 }
 
+/**
+ * Attributes callback for dropshadows shortcode.
+ */
 function sc_basic_dropshadow_attributes($form, $form_state) {
   $form['type'] = array(
     '#type' => 'select',
@@ -512,28 +604,38 @@ function sc_basic_dropshadow_attributes($form, $form_state) {
   return $form;
 }
 
-/*============================================================================================*/
-/* Divider Styles Shortcodes
-/*============================================================================================*/
-function sc_basic_divider($attrs, $content = null) {
+/**
+ * Render function for divider styles shortcode.
+ */
+function sc_basic_divider($attrs, $content = NULL) {
   extract(shortcode_attrs(array(
     'type' => '',
     ), $attrs));
 
   $class = '';
-  if ($type) $class = ' class="' . $type . '"';
+  if ($type) {
+    $class = ' class="' . $type . '"';
+  }
 
   $output = '<hr' . $class . '>';
-  if ($type == 'top') $output .= '<a class="hr-toplink" href="#top">' . t('Back to Top ↑') . '</a>';
+  if ($type == 'top') {
+    $output .= '<a class="hr-toplink" href="#top">' . t('Back to Top ↑') . '</a>';
+  }
 
   return $output;
 }
 
+/**
+ * Tips callback for divider shortcode.
+ */
 function sc_basic_divider_tips($format, $long) {
   $output = '[divider type="invisible|top"][/divider]';
   return $output;
 }
 
+/**
+ * Attributes callback for divider shortcode.
+ */
 function sc_basic_divider_attributes($form, $form_state) {
   $form['type'] = array(
     '#type' => 'select',
@@ -553,39 +655,42 @@ function sc_basic_divider_attributes($form, $form_state) {
 }
 
 
-/*============================================================================================*/
-/* Dropcaps Shortcodes
-/*============================================================================================*/
-function sc_basic_dropcap( $attrs, $content = null ) {
-  $class = !empty($class) ? ' '.$class : '';
+/**
+ * Render function for dropcaps shortcode.
+ */
+function sc_basic_dropcap($attrs, $content = NULL) {
+  $class = !empty($class) ? ' ' . $class : '';
   return '<span class="dropcap">' . check_plain($content)  . '</span>';
 }
 
-
-
+/**
+ * Tips callback for dropcaps shortcode.
+ */
 function sc_basic_dropcap_tips($format, $long) {
   $output = '[dropcap]Y[/dropcap]our content...';
   return $output;
 }
 
-/*============================================================================================*/
-/* Teaser Shortcodes
-/*============================================================================================*/
-function sc_basic_teaser( $attrs, $content = null ) {
-
+/**
+ * Render function for teaser shortcode.
+ */
+function sc_basic_teaser($attrs, $content = NULL) {
   $type = !empty($type) && in_array($type, array('normal', 'large')) ? $type : 'normal';
   return '<p class="teaser">' . $content . '</p>';
 }
 
+/**
+ * Tips callback for teaser shortcode.
+ */
 function sc_basic_teaser_tips($format, $long) {
   $output = '[teaser]Your content[/teaser]';
   return $output;
 }
 
-/*============================================================================================*/
-/* Button Shortcode
-/*============================================================================================*/
-function sc_basic_button( $attrs, $content = null ) {
+/**
+ * Render function for button shortcode.
+ */
+function sc_basic_button($attrs, $content = NULL) {
   extract(shortcode_attrs(array(
   'url'        => '',
   'size'       => '',
@@ -599,17 +704,31 @@ function sc_basic_button( $attrs, $content = null ) {
   ), $attrs));
 
   $style = '';
-  if ($background) $style .= "background-color: $background;";
-  if ($text) $style .= "color: $text;";
+  if ($background) {
+    $style .= "background-color: $background;";
+  }
+  if ($text) {
+    $style .= "color: $text;";
+  }
 
   $classes = array();
-  if ($width) $classes[] = 'col-' . $width;
-  if ($last) $classes[] = 'col-last';
+  if ($width) {
+    $classes[] = 'col-' . $width;
+  }
+  if ($last) {
+    $classes[] = 'col-last';
+  }
+
   $classes[] = 'sc-button';
   $classes[] = 'sc-button-' . $size;
-  if ($align == 'right') $classes[] = 'float-right';
-  if ($align == 'center') $classes[] = 'align-center';
-  // $classes[] = !empty($class) ?  explode(' ', $class) : null;
+
+  if ($align == 'right') {
+    $classes[] = 'float-right';
+  }
+  if ($align == 'center') {
+    $classes[] = 'align-center';
+  }
+  /* $classes[] = !empty($class) ?  explode(' ', $class) : null;*/
 
   return l($content, $url, array(
     'attributes' => array(
@@ -622,11 +741,17 @@ function sc_basic_button( $attrs, $content = null ) {
   );
 }
 
+/**
+ * Tips callback for button shortcode.
+ */
 function sc_basic_button_tips($format, $long) {
   $output = '[button url="http://www.sooperthemes.com" background=Crimson text=Gold size="3" align="center" target="_blank" width="2-3"]2/3rds Button, centred[/button]';
   return $output;
 }
 
+/**
+ * Attributes callback for button shortcode.
+ */
 function sc_basic_button_attributes($form, $form_state) {
   $form['url'] = array(
     '#type' => 'textfield',
@@ -736,10 +861,10 @@ function sc_basic_button_attributes($form, $form_state) {
   return $form;
 }
 
-/*============================================================================================*/
-/* box Shortcode
-/*============================================================================================*/
-function sc_basic_box( $attrs, $content = null ) {
+/**
+ * Render function for box shortcode.
+ */
+function sc_basic_box($attrs, $content = NULL) {
   extract(shortcode_attrs(array(
   'type'       => 1,
   'background' => '',
@@ -752,38 +877,63 @@ function sc_basic_box( $attrs, $content = null ) {
   ), $attrs));
 
   $style = '';
-  if ($background) $style .= "background-color: $background;";
-  if ($text) $style .= "color: $text;";
-  if ($clear) $style .= "clear: $clear;";
+  if ($background) {
+    $style .= "background-color: $background;";
+  }
+  if ($text) {
+    $style .= "color: $text;";
+  }
+  if ($clear) {
+    $style .= "clear: $clear;";
+  }
 
-  if ($style) $style = ' style="' . $style . '"';
+  if ($style) {
+    $style = ' style="' . $style . '"';
+  }
 
   $classes = array();
-  if ($width) $classes[] = 'col-' . $width;
-  if ($last) $classes[] = 'col-last';
+  if ($width) {
+    $classes[] = 'col-' . $width;
+  }
+  if ($last) {
+    $classes[] = 'col-last';
+  }
   if ($type == 'quote') {
     $tag = 'blockquote';
-    if (!$width) $classes[] = 'grid-1-2';
-  } else {
+    if (!$width) {
+      $classes[] = 'grid-1-2';
+    }
+  }
+  else {
     $tag = 'aside';
     $classes[] = 'block';
   }
 
   $classes[] = 'box';
   $classes[] = 'box-' . $type;
-  if ($align == 'right') $classes[] = 'float-right';
-  if ($align == 'center') $classes[] = 'align-center';
-  $classes[] = !empty($class) ?  explode(' ', $class) : null;
+  if ($align == 'right') {
+    $classes[] = 'float-right';
+  }
+  if ($align == 'center') {
+    $classes[] = 'align-center';
+  }
+  $classes[] = !empty($class) ? explode(' ', $class) : NULL;
   $classes = trim(implode(' ', $classes));
 
   return '<' . $tag . ' class="' . $classes . '"' . $style . '>' . $content . "</$tag>";
 }
 
+/**
+ * Tips callback for box shortcode.
+ */
 function sc_basic_box_tips($format, $long) {
   $output = '[box background=tomato text=white align=right width="1-4"]your content here[/box]';
   return $output;
 }
 
+/**
+ * Attributes callback for box shortcode.
+ */
 function sc_basic_box_attributes($form, $form_state) {
   $form['type'] = array(
     '#type' => 'select',
@@ -865,10 +1015,10 @@ function sc_basic_box_attributes($form, $form_state) {
   return $form;
 }
 
-/*============================================================================================*/
-/* highlight Shortcode
-/*============================================================================================*/
-function sc_basic_highlight( $attrs, $content = null ) {
+/**
+ * Render function for highlight shortcode.
+ */
+function sc_basic_highlight($attrs, $content = NULL) {
   extract(shortcode_attrs(array(
   'type'      => '',
   'background'      => '',
@@ -877,24 +1027,36 @@ function sc_basic_highlight( $attrs, $content = null ) {
   ), $attrs));
 
   $style = '';
-  if ($background) $style .= "background-color: $background;";
-  if ($text) $style .= "color: $text;";
+  if ($background) {
+    $style .= "background-color: $background;";
+  }
+  if ($text) {
+    $style .= "color: $text;";
+  }
 
-  if ($style) $style = ' style="' . $style . '"';
+  if ($style) {
+    $style = ' style="' . $style . '"';
+  }
 
   $classes = array();
-  $classes[] = ($type == 2) ?  'highlight2' : 'highlight';
-  $classes[] = !empty($class) ?  explode(' ', $class) : null;
+  $classes[] = ($type == 2) ? 'highlight2' : 'highlight';
+  $classes[] = !empty($class) ? explode(' ', $class) : NULL;
   $classes = trim(implode(' ', $classes));
 
   return '<span class="' . $classes . '"' . $style . '>' . $content . '</span>';
 }
 
+/**
+ * Tips callback for highlight shortcode.
+ */
 function sc_basic_highlight_tips($format, $long) {
   $output = '[highlight type=2 background="yellow" text="black"]your text here[/highlight]';
   return $output;
 }
 
+/**
+ * Attributes callback for highlight shortcode.
+ */
 function sc_basic_highlight_attributes($form, $form_state) {
   $form['type'] = array(
     '#type' => 'select',
@@ -937,10 +1099,10 @@ function sc_basic_highlight_attributes($form, $form_state) {
 }
 
 
-/*============================================================================================*/
-/* Jquery toggle content Shortcode
-/*============================================================================================*/
-function sc_basic_toggle( $attrs, $content = null ) {
+/**
+ * Render function for jquery toggle content shortcode.
+ */
+function sc_basic_toggle($attrs, $content = NULL) {
   extract(shortcode_attrs(array(
   'title'      => '',
   'expanded'      => FALSE,
@@ -956,19 +1118,24 @@ function sc_basic_toggle( $attrs, $content = null ) {
 
   $classes = implode(' ', $classes);
 
-  $out =  '<div class="toggle' . $collapsed . '"><h3 class="' . $classes . '" onclick="$(this).toggleClass(\'expanded\').next().toggle(\'fast\');" ><a href="##">' . $title . '</a></h3>';
+  $out = '<div class="toggle' . $collapsed . '"><h3 class="' . $classes . '" onclick="$(this).toggleClass(\'expanded\').next().toggle(\'fast\');" ><a href="##">' . $title . '</a></h3>';
   $out .= '<div class="toggle-content clearfix">' . $content . '</div>';
   $out .= '</div>';
 
   return $out;
 }
 
-
+/**
+ * Tips callback for toggle shortcode.
+ */
 function sc_basic_toggle_tips($format, $long) {
   $output = '[toggle title="Show toggle shortcode"]Your content here[/toggle]';
   return $output;
 }
 
+/**
+ * Attributes callback for toggle shortcode.
+ */
 function sc_basic_toggle_attributes($form, $form_state) {
   $form['expanded'] = array(
     '#type' => 'select',
@@ -998,99 +1165,128 @@ function sc_basic_toggle_attributes($form, $form_state) {
   return $form;
 }
 
-// Quicktabs implementation is currently now working well because I don't know how to populate
-// Drupal.settings.quicktabs in a way that works well with caching.
-
-// /*============================================================================================*/
-// /* Jquery toggle content Shortcode
-// /*============================================================================================*/
-// function sc_basic_tabs( $attrs, $content = null ) {
-//   extract(shortcode_attrs(array(
-//   'type'      => '',
-//   ), $attrs));
-
-//   if (!function_exists('quicktabs_build_quicktabs')) {
-//     drupal_set_message(t('You must enable the quicktabs module to use the tabs shortcode'), 'error');
-//     return;
-//   }
-
-//   if (($type == 'accordion' OR $type == 'accordeon')) {
-//     $settings = array(
-//       'renderer' => 'accordion',
-//       'options' => array (
-//         'history' => 0,
-//         'jquery_ui' => array(
-//           'autoHeight' => 0,
-//           'collapsible' => 0,
-//         ),
-//       ),
-//     );
-//   } else {
-//     $settings = array();
-//   }
-
-//   global $shortcode_tabs_stack;
-//   $output = drupal_render(quicktabs_build_quicktabs(rand(), $settings, $shortcode_tabs_stack));
-//   $shortcode_tabs_stack = null;
-//   return $output;
-// }
-
-
-// function sc_basic_tabs_tips($format, $long) {
-//   $output = '[tabs][tab-item title="Your title"]Your content[/tab-item][tab-item title="Next title"]Next content[/tab-item][/tabs]';
-//   return $output;
-// }
-// function sc_basic_tab_item( $attrs, $content = null ) {
-//   extract(shortcode_attrs(array(
-//   'title'      => '',
-//   ), $attrs));
-
-//   // Unfortunately there is currently no other way to pass arguments to the
-//   // tabs function #lame
-//   global $shortcode_tabs_stack;
-//   if (!is_array($shortcode_tabs_stack)) $shortcode_tabs_stack = array();
-//   $pane = array(
-//     'title' => $title,
-//     'contents' => array(
-//       '#markup' => $content,
-//     ),
-//     'weight' => count($shortcode_tabs_stack),
-//   );
-//   $shortcode_tabs_stack[] = $pane;
-// }
-
-
-// function sc_basic_tabs_item_tips($format, $long) {
-//   $output = '[tabs type=accordion][tab-item title="Your title"]Your content[/tab-item][tab-item title="Next title"]Next content[/tab-item][/tabs]';
-//   return $output;
-// }
-
-
-/*============================================================================================*/
-/* List style Shortcode
-/*============================================================================================*/
-function sc_basic_icon_list( $attrs, $content = null ) {
+/*
+Quicktabs implementation is currently now working well because I don't know
+how to populate Drupal.settings.quicktabs in a way that works well with caching.
+*/
 
+/**
+ * Jquery toggle content Shortcode
+ */
+/*
+function sc_basic_tabs( $attrs, $content = null ) {
   extract(shortcode_attrs(array(
-  'type'     => '',
+  'type'      => '',
   ), $attrs));
 
+  if (!function_exists('quicktabs_build_quicktabs')) {
+    drupal_set_message(t('You must enable the quicktabs module to use the tabs shortcode'), 'error');
+    return;
+  }
 
-  $types = array('sc-arrow', 'sc-buoy', 'sc-calendar', 'sc-clock', 'sc-pin', 'sc-play', 'sc-skip', 'sc-thumb', 'sc-tick', 'sc-tick-grey', 'sc-warning');
+  if (($type == 'accordion' OR $type == 'accordeon')) {
+    $settings = array(
+      'renderer' => 'accordion',
+      'options' => array (
+        'history' => 0,
+        'jquery_ui' => array(
+          'autoHeight' => 0,
+          'collapsible' => 0,
+        ),
+      ),
+    );
+  } else {
+    $settings = array();
+  }
+
+  global $shortcode_tabs_stack;
+  $output = drupal_render(quicktabs_build_quicktabs(rand(), $settings, $shortcode_tabs_stack));
+  $shortcode_tabs_stack = null;
+  return $output;
+}
+*/
+
+/**
+ * Tips callback for tabs shortcode.
+ */
+/*
+function sc_basic_tabs_tips($format, $long) {
+  $output = '[tabs][tab-item title="Your title"]Your content[/tab-item][tab-item title="Next title"]Next content[/tab-item][/tabs]';
+  return $output;
+}
+*/
+
+/*
+function sc_basic_tab_item( $attrs, $content = null ) {
+  extract(shortcode_attrs(array(
+  'title'      => '',
+  ), $attrs));
+
+  // Unfortunately there is currently no other way to pass arguments to the
+  // tabs function #lame
+  global $shortcode_tabs_stack;
+  if (!is_array($shortcode_tabs_stack)) $shortcode_tabs_stack = array();
+  $pane = array(
+    'title' => $title,
+    'contents' => array(
+      '#markup' => $content,
+    ),
+    'weight' => count($shortcode_tabs_stack),
+  );
+  $shortcode_tabs_stack[] = $pane;
+}
+*/
+
+/**
+ * Tips callback for tabs item shortcode.
+ */
+/*
+function sc_basic_tabs_item_tips($format, $long) {
+  $output = '[tabs type=accordion][tab-item title="Your title"]Your content[/tab-item][tab-item title="Next title"]Next content[/tab-item][/tabs]';
+  return $output;
+}
+*/
+
+/**
+ * Render function for list style shortcode.
+ */
+function sc_basic_icon_list($attrs, $content = NULL) {
+
+  extract(shortcode_attrs(array('type' => ''), $attrs));
+
+  $types = array(
+    'sc-arrow',
+    'sc-buoy',
+    'sc-calendar',
+    'sc-clock',
+    'sc-pin',
+    'sc-play',
+    'sc-skip',
+    'sc-thumb',
+    'sc-tick',
+    'sc-tick-grey',
+    'sc-warning',
+  );
 
 
   $type = trim(strtolower($type));
   $classes = array();
   $classes[] = 'sc-icon-list';
-  if (in_array($type, $types)) $classes[] = $type;
+
+  if (in_array($type, $types)) {
+    $classes[] = $type;
+  }
 
   $classes = trim(implode(' ', $classes));
-  $output = preg_replace("/<(ul|ol|dl)[a-z0-9\"'=\s-_]*?>/","<ul class=\"$classes\">", $content);
+  $output = preg_replace("/<(ul|ol|dl)[a-z0-9\"'=\s-_]*?>/", "<ul class=\"$classes\">", $content);
 
   return $output;
 }
 
+/**
+ * Tips callback for the icon-list shortcode.
+ */
 function sc_basic_icon_list_tips($format, $long) {
   $output = '[icon-list type=sc-arrow|sc-buoy||sc-calendar|sc-clock|sc-pin|sc-arrow|sc-play|sc-skip|sc-thumb|sc-tick|sc-tick-grey|sc-warning]your list here[/icon-list]';
   return $output;
-}
\ No newline at end of file
+}
