diff --git a/cod_bof/cod_bof.features.field.inc b/cod_bof/cod_bof.features.field.inc
index be4ab6ab6db1de47255873291c4d1e4043b5148c..063d38bac2a82d8b1f3d748772e01a344a535099 100644
--- a/cod_bof/cod_bof.features.field.inc
+++ b/cod_bof/cod_bof.features.field.inc
@@ -10,7 +10,7 @@
 function cod_bof_field_default_fields() {
   $fields = array();
 
-  // Exported field: 'node-bof_session-body'
+  // Exported field: 'node-bof_session-body'.
   $fields['node-bof_session-body'] = array(
     'field_config' => array(
       'active' => '1',
@@ -36,6 +36,7 @@ function cod_bof_field_default_fields() {
           0 => 'format',
         ),
       ),
+      'locked' => '0',
       'module' => 'text',
       'settings' => array(
         'field_permissions' => array(
@@ -62,6 +63,12 @@ function cod_bof_field_default_fields() {
           'type' => 'text_default',
           'weight' => 0,
         ),
+        'listing' => array(
+          'label' => 'above',
+          'settings' => array(),
+          'type' => 'hidden',
+          'weight' => 0,
+        ),
         'teaser' => array(
           'label' => 'hidden',
           'module' => 'text',
@@ -94,11 +101,11 @@ function cod_bof_field_default_fields() {
     ),
   );
 
-  // Exported field: 'node-bof_session-field_session_room'
+  // Exported field: 'node-bof_session-field_session_room'.
   $fields['node-bof_session-field_session_room'] = array(
     'field_config' => array(
       'active' => '1',
-      'cardinality' => '-1',
+      'cardinality' => '1',
       'deleted' => '0',
       'entity_types' => array(),
       'field_name' => 'field_session_room',
@@ -106,58 +113,65 @@ function cod_bof_field_default_fields() {
         'type' => '2',
       ),
       'foreign keys' => array(
-        'nid' => array(
+        'node' => array(
           'columns' => array(
-            'nid' => 'nid',
+            'target_id' => 'nid',
           ),
           'table' => 'node',
         ),
       ),
       'indexes' => array(
-        'nid' => array(
-          0 => 'nid',
+        'target_id' => array(
+          0 => 'target_id',
         ),
       ),
-      'module' => 'node_reference',
+      'locked' => '0',
+      'module' => 'entityreference',
       'settings' => array(
-        'field_permissions' => array(
-          'create' => 0,
-          'edit' => 'edit',
-          'edit own' => 0,
-          'view' => 'view',
-          'view own' => 0,
-        ),
-        'referenceable_types' => array(
-          'article' => 0,
-          'bof_session' => 0,
-          'page' => 0,
-          'room' => 'room',
-          'schedule_item' => 0,
-          'session' => 0,
-          'time_slot' => 0,
-        ),
-        'view' => array(
-          'args' => array(),
-          'display_name' => '',
-          'view_name' => '',
+        'handler' => 'base',
+        'handler_settings' => array(
+          'behaviors' => array(
+            'views-select-list' => array(
+              'status' => 0,
+            ),
+          ),
+          'sort' => array(
+            'direction' => 'ASC',
+            'field' => 'body:value',
+            'property' => 'title',
+            'type' => 'property',
+          ),
+          'target_bundles' => array(
+            'room' => 'room',
+          ),
         ),
+        'handler_submit' => 'Change handler',
+        'target_type' => 'node',
       ),
-      'translatable' => '1',
-      'type' => 'node_reference',
+      'translatable' => '0',
+      'type' => 'entityreference',
     ),
     'field_instance' => array(
       'bundle' => 'bof_session',
       'default_value' => NULL,
       'deleted' => '0',
-      'description' => 'Select room in which this BoF occurs.',
+      'description' => '',
       'display' => array(
         'default' => array(
           'label' => 'above',
-          'module' => 'node_reference',
-          'settings' => array(),
-          'type' => 'node_reference_default',
+          'module' => 'entityreference',
+          'settings' => array(
+            'link' => FALSE,
+          ),
+          'type' => 'entityreference_label',
           'weight' => 1,
         ),
+        'listing' => array(
+          'label' => 'above',
+          'settings' => array(),
+          'type' => 'hidden',
+          'weight' => 0,
+        ),
         'teaser' => array(
           'label' => 'above',
           'settings' => array(),
@@ -168,7 +182,7 @@ function cod_bof_field_default_fields() {
       'entity_type' => 'node',
       'field_name' => 'field_session_room',
       'label' => 'Room',
-      'required' => 0,
+      'required' => 1,
       'settings' => array(
         'user_register_form' => FALSE,
       ),
@@ -182,7 +196,7 @@ function cod_bof_field_default_fields() {
     ),
   );
 
-  // Exported field: 'node-bof_session-field_session_slot'
+  // Exported field: 'node-bof_session-field_session_slot'.
   $fields['node-bof_session-field_session_slot'] = array(
     'field_config' => array(
       'active' => '1',
@@ -194,44 +208,43 @@ function cod_bof_field_default_fields() {
         'type' => '2',
       ),
       'foreign keys' => array(
-        'nid' => array(
+        'node' => array(
           'columns' => array(
-            'nid' => 'nid',
+            'target_id' => 'nid',
           ),
           'table' => 'node',
         ),
       ),
       'indexes' => array(
-        'nid' => array(
-          0 => 'nid',
+        'target_id' => array(
+          0 => 'target_id',
         ),
       ),
-      'module' => 'node_reference',
+      'locked' => '0',
+      'module' => 'entityreference',
       'settings' => array(
-        'field_permissions' => array(
-          'create' => 0,
-          'edit' => 'edit',
-          'edit own' => 0,
-          'view' => 'view',
-          'view own' => 0,
-        ),
-        'referenceable_types' => array(
-          'article' => 0,
-          'bof_session' => 0,
-          'page' => 0,
-          'room' => 0,
-          'schedule_item' => 0,
-          'session' => 0,
-          'time_slot' => 'time_slot',
-        ),
-        'view' => array(
-          'args' => array(),
-          'display_name' => '',
-          'view_name' => '',
+        'handler' => 'base',
+        'handler_settings' => array(
+          'behaviors' => array(
+            'views-select-list' => array(
+              'status' => 0,
+            ),
+          ),
+          'sort' => array(
+            'direction' => 'ASC',
+            'field' => 'body:value',
+            'property' => 'title',
+            'type' => 'property',
+          ),
+          'target_bundles' => array(
+            'time_slot' => 'time_slot',
+          ),
         ),
+        'handler_submit' => 'Change handler',
+        'target_type' => 'node',
       ),
-      'translatable' => '1',
-      'type' => 'node_reference',
+      'translatable' => '0',
+      'type' => 'entityreference',
     ),
     'field_instance' => array(
       'bundle' => 'bof_session',
@@ -241,11 +254,19 @@ function cod_bof_field_default_fields() {
       'display' => array(
         'default' => array(
           'label' => 'above',
-          'module' => 'node_reference',
-          'settings' => array(),
-          'type' => 'node_reference_default',
+          'module' => 'entityreference',
+          'settings' => array(
+            'link' => FALSE,
+          ),
+          'type' => 'entityreference_label',
           'weight' => 2,
         ),
+        'listing' => array(
+          'label' => 'above',
+          'settings' => array(),
+          'type' => 'hidden',
+          'weight' => 0,
+        ),
         'teaser' => array(
           'label' => 'above',
           'settings' => array(),
@@ -256,7 +277,7 @@ function cod_bof_field_default_fields() {
       'entity_type' => 'node',
       'field_name' => 'field_session_slot',
       'label' => 'Time slot',
-      'required' => 0,
+      'required' => 1,
       'settings' => array(
         'user_register_form' => FALSE,
       ),
@@ -274,7 +295,6 @@ function cod_bof_field_default_fields() {
   // Included for use with string extractors like potx.
   t('Description');
   t('Room');
-  t('Select room in which this BoF occurs.');
   t('Time slot');
 
   return $fields;
diff --git a/cod_bof/cod_bof.features.user_permission.inc b/cod_bof/cod_bof.features.user_permission.inc
index a044ac10d9c4cb56fcb7aa5cd2a6a9baad1b8f35..5f0948fb93cd7e9516255b60a96e101db681afe5 100644
--- a/cod_bof/cod_bof.features.user_permission.inc
+++ b/cod_bof/cod_bof.features.user_permission.inc
@@ -10,7 +10,7 @@
 function cod_bof_user_default_permissions() {
   $permissions = array();
 
-  // Exported permission: create bof_session content
+  // Exported permission: create bof_session content.
   $permissions['create bof_session content'] = array(
     'name' => 'create bof_session content',
     'roles' => array(
@@ -19,13 +19,14 @@ function cod_bof_user_default_permissions() {
     'module' => 'node',
   );
 
-  // Exported permission: delete any bof_session content
+  // Exported permission: delete any bof_session content.
   $permissions['delete any bof_session content'] = array(
     'name' => 'delete any bof_session content',
     'roles' => array(),
+    'module' => 'node',
   );
 
-  // Exported permission: delete own bof_session content
+  // Exported permission: delete own bof_session content.
   $permissions['delete own bof_session content'] = array(
     'name' => 'delete own bof_session content',
     'roles' => array(
@@ -34,13 +35,14 @@ function cod_bof_user_default_permissions() {
     'module' => 'node',
   );
 
-  // Exported permission: edit any bof_session content
+  // Exported permission: edit any bof_session content.
   $permissions['edit any bof_session content'] = array(
     'name' => 'edit any bof_session content',
     'roles' => array(),
+    'module' => 'node',
   );
 
-  // Exported permission: edit own bof_session content
+  // Exported permission: edit own bof_session content.
   $permissions['edit own bof_session content'] = array(
     'name' => 'edit own bof_session content',
     'roles' => array(
diff --git a/cod_bof/cod_bof.info b/cod_bof/cod_bof.info
index 3a3a97194efcd37c540d38830c2cd95f1ca71190..cbde4bc1705bc012f42ef24fc19355a1d2bd5a25 100644
--- a/cod_bof/cod_bof.info
+++ b/cod_bof/cod_bof.info
@@ -1,35 +1,38 @@
-name = "COD BoF Session"
-description = "BoFs are self-scheduled, unconference style sessions"
-core = "7.x"
-package = "COD"
-php = "5.2.4"
-dependencies[] = "cod_session"
-dependencies[] = "features"
-dependencies[] = "node_reference"
-dependencies[] = "strongarm"
-dependencies[] = "views"
-features[ctools][] = "strongarm:strongarm:1"
-features[ctools][] = "views:views_default:3.0"
-features[field][] = "node-bof_session-body"
-features[field][] = "node-bof_session-field_session_room"
-features[field][] = "node-bof_session-field_session_slot"
-features[node][] = "bof_session"
-features[user_permission][] = "create bof_session content"
-features[user_permission][] = "delete any bof_session content"
-features[user_permission][] = "delete own bof_session content"
-features[user_permission][] = "edit any bof_session content"
-features[user_permission][] = "edit own bof_session content"
-features[variable][] = "cod_unique_bof_session"
-features[variable][] = "comment_anonymous_bof_session"
-features[variable][] = "comment_bof_session"
-features[variable][] = "comment_default_mode_bof_session"
-features[variable][] = "comment_default_per_page_bof_session"
-features[variable][] = "comment_form_location_bof_session"
-features[variable][] = "comment_preview_bof_session"
-features[variable][] = "comment_subject_field_bof_session"
-features[variable][] = "menu_options_bof_session"
-features[variable][] = "menu_parent_bof_session"
-features[variable][] = "node_options_bof_session"
-features[variable][] = "node_preview_bof_session"
-features[variable][] = "node_submitted_bof_session"
-features[views_view][] = "bof_schedule"
+name = COD BoF Session
+description = BoFs are self-scheduled, unconference style sessions
+core = 7.x
+package = COD
+php = 5.2.4
+dependencies[] = cod_session
+dependencies[] = entityreference
+dependencies[] = features
+dependencies[] = options
+dependencies[] = strongarm
+dependencies[] = views
+features[ctools][] = strongarm:strongarm:1
+features[ctools][] = views:views_default:3.0
+features[features_api][] = api:1
+features[field][] = node-bof_session-body
+features[field][] = node-bof_session-field_session_room
+features[field][] = node-bof_session-field_session_slot
+features[node][] = bof_session
+features[user_permission][] = create bof_session content
+features[user_permission][] = delete any bof_session content
+features[user_permission][] = delete own bof_session content
+features[user_permission][] = edit any bof_session content
+features[user_permission][] = edit own bof_session content
+features[variable][] = cod_unique_bof_session
+features[variable][] = comment_anonymous_bof_session
+features[variable][] = comment_bof_session
+features[variable][] = comment_default_mode_bof_session
+features[variable][] = comment_default_per_page_bof_session
+features[variable][] = comment_form_location_bof_session
+features[variable][] = comment_preview_bof_session
+features[variable][] = comment_subject_field_bof_session
+features[variable][] = field_bundle_settings_node__bof_session
+features[variable][] = menu_options_bof_session
+features[variable][] = menu_parent_bof_session
+features[variable][] = node_options_bof_session
+features[variable][] = node_preview_bof_session
+features[variable][] = node_submitted_bof_session
+features[views_view][] = bof_schedule
diff --git a/cod_bof/cod_bof.module b/cod_bof/cod_bof.module
index 2d4252b1050dad485089b7870c33c2883296b178..c226fb0c9545d79ff903b3e4b7866fa8d74257be 100644
--- a/cod_bof/cod_bof.module
+++ b/cod_bof/cod_bof.module
@@ -5,3 +5,38 @@
  */
 
 include_once('cod_bof.features.inc');
+
+function cod_bof_views_pre_view(&$view, &$display_id, &$args) {
+
+  if($view->name == 'bof_schedule' && $display_id == 'block_1') {
+    $footer = cod_bof_get_bof_link($args[0], $args[1]);
+    $options = array(
+      'id' => 'area',
+      'table' => 'views',
+      'field' => 'area',
+      'empty' => TRUE,
+      'content' => $footer,
+      'format' => 'html',
+      'tokenize' => 0,
+    );
+    $view->set_item('block_1', 'footer', 'area', $options);
+  }
+}
+
+function cod_bof_get_bof_link($room_nid, $time_nid) {
+  $room = node_load($room_nid);
+  $sql = "SELECT count(t.entity_id)
+    FROM field_data_field_session_slot t, field_data_field_session_room r
+    WHERE r.field_session_room_target_id = :room AND t.field_session_slot_target_id = :timeslot AND r.entity_id = t.entity_id AND r.revision_id = t.revision_id";
+
+  $bof_count = db_query($sql, array(':room' => $room_nid, ':timeslot' => $time_nid))->fetchField();
+  $entity_id = cod_session_get_collection_entity($room_nid, $time_nid);
+  $field_collection_item = field_collection_item_load($entity_id); // Load that field collection item.
+  if(!empty($field_collection_item->field_slot_types_capacity)) {
+    if($bof_count < $field_collection_item->field_slot_types_capacity[LANGUAGE_NONE][0]['value']) {
+      if(user_access('create bof_session content')) {
+        return l('Create a BoF','node/add/bof-session',array('query' => array('edit[field_session_room][target_id]' => $room_nid, 'edit[field_session_slot][target_id]' => $time_nid)));
+      }
+    }
+  }
+}
diff --git a/cod_bof/cod_bof.strongarm.inc b/cod_bof/cod_bof.strongarm.inc
index c8a0685845732c54d5932393b1fd00b327f970b9..7e794ec27dd7dfe531725ac8b4bf7be63a20516b 100644
--- a/cod_bof/cod_bof.strongarm.inc
+++ b/cod_bof/cod_bof.strongarm.inc
@@ -10,63 +10,80 @@
 function cod_bof_strongarm() {
   $export = array();
 
-  $strongarm = new stdClass;
+  $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'cod_unique_bof_session';
   $strongarm->value = 'multiple';
   $export['cod_unique_bof_session'] = $strongarm;
 
-  $strongarm = new stdClass;
+  $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'comment_anonymous_bof_session';
   $strongarm->value = 0;
   $export['comment_anonymous_bof_session'] = $strongarm;
 
-  $strongarm = new stdClass;
+  $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'comment_bof_session';
   $strongarm->value = '2';
   $export['comment_bof_session'] = $strongarm;
 
-  $strongarm = new stdClass;
+  $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'comment_default_mode_bof_session';
   $strongarm->value = 1;
   $export['comment_default_mode_bof_session'] = $strongarm;
 
-  $strongarm = new stdClass;
+  $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'comment_default_per_page_bof_session';
   $strongarm->value = '50';
   $export['comment_default_per_page_bof_session'] = $strongarm;
 
-  $strongarm = new stdClass;
+  $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'comment_form_location_bof_session';
   $strongarm->value = 1;
   $export['comment_form_location_bof_session'] = $strongarm;
 
-  $strongarm = new stdClass;
+  $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'comment_preview_bof_session';
   $strongarm->value = '1';
   $export['comment_preview_bof_session'] = $strongarm;
 
-  $strongarm = new stdClass;
+  $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'comment_subject_field_bof_session';
   $strongarm->value = 1;
   $export['comment_subject_field_bof_session'] = $strongarm;
 
-  $strongarm = new stdClass;
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'field_bundle_settings_node__bof_session';
+  $strongarm->value = array(
+    'view_modes' => array(),
+    'extra_fields' => array(
+      'form' => array(
+        'title' => array(
+          'weight' => '-5',
+        ),
+      ),
+      'display' => array(),
+    ),
+  );
+  $export['field_bundle_settings_node__bof_session'] = $strongarm;
+
+  $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'menu_options_bof_session';
@@ -75,14 +92,14 @@ function cod_bof_strongarm() {
   );
   $export['menu_options_bof_session'] = $strongarm;
 
-  $strongarm = new stdClass;
+  $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'menu_parent_bof_session';
   $strongarm->value = 'main-menu:0';
   $export['menu_parent_bof_session'] = $strongarm;
 
-  $strongarm = new stdClass;
+  $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'node_options_bof_session';
@@ -92,14 +109,14 @@ function cod_bof_strongarm() {
   );
   $export['node_options_bof_session'] = $strongarm;
 
-  $strongarm = new stdClass;
+  $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'node_preview_bof_session';
   $strongarm->value = '1';
   $export['node_preview_bof_session'] = $strongarm;
 
-  $strongarm = new stdClass;
+  $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'node_submitted_bof_session';
diff --git a/cod_bof/cod_bof.views_default.inc b/cod_bof/cod_bof.views_default.inc
index 33d959848ac5d2f78c3e570549b5ca8ca52d6631..f0d1c1b86a364d808f97ba30def795a7e684df31 100644
--- a/cod_bof/cod_bof.views_default.inc
+++ b/cod_bof/cod_bof.views_default.inc
@@ -12,10 +12,10 @@ function cod_bof_views_default_views() {
 
   $view = new view;
   $view->name = 'bof_schedule';
-  $view->description = '';
+  $view->description = 'Conference Organizing Scheduler Admin View';
   $view->tag = 'default';
   $view->base_table = 'node';
-  $view->human_name = 'BoFs';
+  $view->human_name = 'bof_schedule';
   $view->core = 7;
   $view->api_version = '3.0';
   $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@@ -23,23 +23,35 @@ function cod_bof_views_default_views() {
   /* Display: Master */
   $handler = $view->new_display('default', 'Master', 'default');
   $handler->display->display_options['title'] = 'BoFs';
-  $handler->display->display_options['access']['type'] = 'none';
+  $handler->display->display_options['access']['type'] = 'perm';
   $handler->display->display_options['cache']['type'] = 'none';
   $handler->display->display_options['query']['type'] = 'views_query';
   $handler->display->display_options['query']['options']['query_comment'] = FALSE;
   $handler->display->display_options['exposed_form']['type'] = 'basic';
-  $handler->display->display_options['pager']['type'] = 'full';
-  $handler->display->display_options['pager']['options']['items_per_page'] = '10';
-  $handler->display->display_options['style_plugin'] = 'cod_session_schedule';
-  $handler->display->display_options['style_options']['schedule_interactive'] = '1';
-  $handler->display->display_options['style_options']['schedule_days'] = array(
-    'Friday May, 04 2012' => 0,
-    'Saturday May, 05 2012' => 0,
-    'Sunday May, 06 2012' => 0,
-    'Monday May, 07 2012' => 0,
+  $handler->display->display_options['pager']['type'] = 'none';
+  $handler->display->display_options['style_plugin'] = 'quicktabs';
+  $handler->display->display_options['style_options']['grouping'] = array(
+    0 => array(
+      'field' => 'field_slot_datetime',
+      'rendered' => 1,
+      'rendered_strip' => 1,
+    ),
   );
-  $handler->display->display_options['style_options']['interactive_type'] = 'bof_session';
+  $handler->display->display_options['style_options']['tab_style'] = 'Basic';
+  $handler->display->display_options['style_options']['tab_title_field'] = 'field_slot_datetime';
   $handler->display->display_options['row_plugin'] = 'fields';
+  /* Relationship: Content: Allowed Slot Types (field_room_slots_types_allowed) */
+  $handler->display->display_options['relationships']['field_room_slots_types_allowed_value']['id'] = 'field_room_slots_types_allowed_value';
+  $handler->display->display_options['relationships']['field_room_slots_types_allowed_value']['table'] = 'field_data_field_room_slots_types_allowed';
+  $handler->display->display_options['relationships']['field_room_slots_types_allowed_value']['field'] = 'field_room_slots_types_allowed_value';
+  $handler->display->display_options['relationships']['field_room_slots_types_allowed_value']['required'] = 1;
+  $handler->display->display_options['relationships']['field_room_slots_types_allowed_value']['delta'] = '-1';
+  /* Relationship: Entity Reference: Referenced Entity */
+  $handler->display->display_options['relationships']['field_slot_types_time_slot_target_id']['id'] = 'field_slot_types_time_slot_target_id';
+  $handler->display->display_options['relationships']['field_slot_types_time_slot_target_id']['table'] = 'field_data_field_slot_types_time_slot';
+  $handler->display->display_options['relationships']['field_slot_types_time_slot_target_id']['field'] = 'field_slot_types_time_slot_target_id';
+  $handler->display->display_options['relationships']['field_slot_types_time_slot_target_id']['relationship'] = 'field_room_slots_types_allowed_value';
+  $handler->display->display_options['relationships']['field_slot_types_time_slot_target_id']['required'] = 1;
   /* Field: Content: Title */
   $handler->display->display_options['fields']['title']['id'] = 'title';
   $handler->display->display_options['fields']['title']['table'] = 'node';
@@ -56,45 +68,252 @@ function cod_bof_views_default_views() {
   $handler->display->display_options['fields']['title']['hide_empty'] = 0;
   $handler->display->display_options['fields']['title']['empty_zero'] = 0;
   $handler->display->display_options['fields']['title']['link_to_node'] = 1;
-  /* Field: Node: Edit link */
-  $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
-  $handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
-  $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
-  $handler->display->display_options['fields']['edit_node']['label'] = '';
-  $handler->display->display_options['fields']['edit_node']['alter']['alter_text'] = 0;
-  $handler->display->display_options['fields']['edit_node']['alter']['make_link'] = 0;
-  $handler->display->display_options['fields']['edit_node']['alter']['absolute'] = 0;
-  $handler->display->display_options['fields']['edit_node']['alter']['replace_spaces'] = 0;
-  $handler->display->display_options['fields']['edit_node']['alter']['trim_whitespace'] = 0;
-  $handler->display->display_options['fields']['edit_node']['alter']['nl2br'] = 0;
-  $handler->display->display_options['fields']['edit_node']['alter']['word_boundary'] = 1;
-  $handler->display->display_options['fields']['edit_node']['alter']['ellipsis'] = 1;
-  $handler->display->display_options['fields']['edit_node']['alter']['strip_tags'] = 0;
-  $handler->display->display_options['fields']['edit_node']['alter']['trim'] = 0;
-  $handler->display->display_options['fields']['edit_node']['alter']['html'] = 0;
-  $handler->display->display_options['fields']['edit_node']['element_label_colon'] = FALSE;
-  $handler->display->display_options['fields']['edit_node']['element_default_classes'] = 1;
-  $handler->display->display_options['fields']['edit_node']['hide_empty'] = 0;
-  $handler->display->display_options['fields']['edit_node']['empty_zero'] = 0;
-  $handler->display->display_options['fields']['edit_node']['hide_alter_empty'] = 1;
+  /* Field: Field collection item: Time Slot */
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['id'] = 'field_slot_types_time_slot_1';
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['table'] = 'field_data_field_slot_types_time_slot';
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['field'] = 'field_slot_types_time_slot';
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['relationship'] = 'field_room_slots_types_allowed_value';
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['label'] = '';
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['alter']['alter_text'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['alter']['make_link'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['alter']['absolute'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['alter']['external'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['alter']['replace_spaces'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['alter']['trim_whitespace'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['alter']['nl2br'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['alter']['word_boundary'] = 1;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['alter']['ellipsis'] = 1;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['alter']['more_link'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['alter']['strip_tags'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['alter']['trim'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['alter']['html'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['element_default_classes'] = 1;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['empty_zero'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['hide_alter_empty'] = 1;
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['settings'] = array(
+    'link' => 0,
+  );
+  $handler->display->display_options['fields']['field_slot_types_time_slot_1']['field_api_classes'] = 0;
+  /* Field: Field collection item: Time Slot */
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['id'] = 'field_slot_types_time_slot';
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['table'] = 'field_data_field_slot_types_time_slot';
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['field'] = 'field_slot_types_time_slot';
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['relationship'] = 'field_room_slots_types_allowed_value';
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['label'] = '';
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['exclude'] = TRUE;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['alter']['alter_text'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['alter']['make_link'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['alter']['absolute'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['alter']['external'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['alter']['replace_spaces'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['alter']['trim_whitespace'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['alter']['nl2br'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['alter']['word_boundary'] = 1;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['alter']['ellipsis'] = 1;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['alter']['more_link'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['alter']['strip_tags'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['alter']['trim'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['alter']['html'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['element_default_classes'] = 1;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['empty_zero'] = 0;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['hide_alter_empty'] = 1;
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['type'] = 'entityreference_entity_id';
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['settings'] = array(
+    'link' => 0,
+  );
+  $handler->display->display_options['fields']['field_slot_types_time_slot']['field_api_classes'] = 0;
+  /* Field: Content: Date and time */
+  $handler->display->display_options['fields']['field_slot_datetime']['id'] = 'field_slot_datetime';
+  $handler->display->display_options['fields']['field_slot_datetime']['table'] = 'field_data_field_slot_datetime';
+  $handler->display->display_options['fields']['field_slot_datetime']['field'] = 'field_slot_datetime';
+  $handler->display->display_options['fields']['field_slot_datetime']['relationship'] = 'field_slot_types_time_slot_target_id';
+  $handler->display->display_options['fields']['field_slot_datetime']['label'] = '';
+  $handler->display->display_options['fields']['field_slot_datetime']['exclude'] = TRUE;
+  $handler->display->display_options['fields']['field_slot_datetime']['alter']['alter_text'] = 0;
+  $handler->display->display_options['fields']['field_slot_datetime']['alter']['make_link'] = 0;
+  $handler->display->display_options['fields']['field_slot_datetime']['alter']['absolute'] = 0;
+  $handler->display->display_options['fields']['field_slot_datetime']['alter']['external'] = 0;
+  $handler->display->display_options['fields']['field_slot_datetime']['alter']['replace_spaces'] = 0;
+  $handler->display->display_options['fields']['field_slot_datetime']['alter']['trim_whitespace'] = 0;
+  $handler->display->display_options['fields']['field_slot_datetime']['alter']['nl2br'] = 0;
+  $handler->display->display_options['fields']['field_slot_datetime']['alter']['word_boundary'] = 1;
+  $handler->display->display_options['fields']['field_slot_datetime']['alter']['ellipsis'] = 1;
+  $handler->display->display_options['fields']['field_slot_datetime']['alter']['more_link'] = 0;
+  $handler->display->display_options['fields']['field_slot_datetime']['alter']['strip_tags'] = 0;
+  $handler->display->display_options['fields']['field_slot_datetime']['alter']['trim'] = 0;
+  $handler->display->display_options['fields']['field_slot_datetime']['alter']['html'] = 0;
+  $handler->display->display_options['fields']['field_slot_datetime']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['field_slot_datetime']['element_default_classes'] = 1;
+  $handler->display->display_options['fields']['field_slot_datetime']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['field_slot_datetime']['empty_zero'] = 0;
+  $handler->display->display_options['fields']['field_slot_datetime']['hide_alter_empty'] = 1;
+  $handler->display->display_options['fields']['field_slot_datetime']['settings'] = array(
+    'format_type' => 'date_no_time_',
+    'fromto' => 'value',
+    'multiple_number' => '',
+    'multiple_from' => '',
+    'multiple_to' => '',
+  );
+  $handler->display->display_options['fields']['field_slot_datetime']['field_api_classes'] = 0;
+  /* Field: Content: Nid */
+  $handler->display->display_options['fields']['nid']['id'] = 'nid';
+  $handler->display->display_options['fields']['nid']['table'] = 'node';
+  $handler->display->display_options['fields']['nid']['field'] = 'nid';
+  $handler->display->display_options['fields']['nid']['label'] = '';
+  $handler->display->display_options['fields']['nid']['exclude'] = TRUE;
+  $handler->display->display_options['fields']['nid']['alter']['alter_text'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['make_link'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['absolute'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['external'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['replace_spaces'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['trim_whitespace'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['nl2br'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['word_boundary'] = 1;
+  $handler->display->display_options['fields']['nid']['alter']['ellipsis'] = 1;
+  $handler->display->display_options['fields']['nid']['alter']['more_link'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['strip_tags'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['trim'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['html'] = 0;
+  $handler->display->display_options['fields']['nid']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['nid']['element_default_classes'] = 1;
+  $handler->display->display_options['fields']['nid']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['nid']['empty_zero'] = 0;
+  $handler->display->display_options['fields']['nid']['hide_alter_empty'] = 1;
+  $handler->display->display_options['fields']['nid']['link_to_node'] = 0;
+  /* Field: Global: View */
+  $handler->display->display_options['fields']['view']['id'] = 'view';
+  $handler->display->display_options['fields']['view']['table'] = 'views';
+  $handler->display->display_options['fields']['view']['field'] = 'view';
+  $handler->display->display_options['fields']['view']['label'] = '';
+  $handler->display->display_options['fields']['view']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['view']['element_default_classes'] = 1;
+  $handler->display->display_options['fields']['view']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['view']['empty_zero'] = 0;
+  $handler->display->display_options['fields']['view']['hide_alter_empty'] = 1;
+  $handler->display->display_options['fields']['view']['view'] = 'bof_schedule';
+  $handler->display->display_options['fields']['view']['display'] = 'block_1';
+  $handler->display->display_options['fields']['view']['arguments'] = '[!nid]/[%field_slot_types_time_slot]';
+  $handler->display->display_options['fields']['view']['query_aggregation'] = 0;
+  /* Sort criterion: Content: Date and time (field_slot_datetime) */
+  $handler->display->display_options['sorts']['field_slot_datetime_value']['id'] = 'field_slot_datetime_value';
+  $handler->display->display_options['sorts']['field_slot_datetime_value']['table'] = 'field_data_field_slot_datetime';
+  $handler->display->display_options['sorts']['field_slot_datetime_value']['field'] = 'field_slot_datetime_value';
+  $handler->display->display_options['sorts']['field_slot_datetime_value']['relationship'] = 'field_slot_types_time_slot_target_id';
   /* Filter criterion: Content: Published */
   $handler->display->display_options['filters']['status']['id'] = 'status';
   $handler->display->display_options['filters']['status']['table'] = 'node';
   $handler->display->display_options['filters']['status']['field'] = 'status';
   $handler->display->display_options['filters']['status']['value'] = 1;
-  $handler->display->display_options['filters']['status']['group'] = 0;
+  $handler->display->display_options['filters']['status']['group'] = 1;
   $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
   /* Filter criterion: Content: Type */
   $handler->display->display_options['filters']['type']['id'] = 'type';
   $handler->display->display_options['filters']['type']['table'] = 'node';
   $handler->display->display_options['filters']['type']['field'] = 'type';
   $handler->display->display_options['filters']['type']['value'] = array(
-    'bof_session' => 'bof_session',
+    'room' => 'room',
   );
 
   /* Display: Page */
   $handler = $view->new_display('page', 'Page', 'page');
-  $handler->display->display_options['path'] = 'program/bofs';
+  $handler->display->display_options['path'] = 'program/schedule/bofs';
+
+  /* Display: Block */
+  $handler = $view->new_display('block', 'Block', 'block_1');
+  $handler->display->display_options['defaults']['style_plugin'] = FALSE;
+  $handler->display->display_options['style_plugin'] = 'default';
+  $handler->display->display_options['defaults']['style_options'] = FALSE;
+  $handler->display->display_options['defaults']['row_plugin'] = FALSE;
+  $handler->display->display_options['row_plugin'] = 'fields';
+  $handler->display->display_options['defaults']['row_options'] = FALSE;
+  $handler->display->display_options['defaults']['relationships'] = FALSE;
+  $handler->display->display_options['defaults']['fields'] = FALSE;
+  /* Field: Content: Title */
+  $handler->display->display_options['fields']['title']['id'] = 'title';
+  $handler->display->display_options['fields']['title']['table'] = 'node';
+  $handler->display->display_options['fields']['title']['field'] = 'title';
+  $handler->display->display_options['fields']['title']['label'] = '';
+  $handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
+  $handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
+  $handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
+  $handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
+  $handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
+  $handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
+  $handler->display->display_options['fields']['title']['alter']['trim'] = 0;
+  $handler->display->display_options['fields']['title']['alter']['html'] = 0;
+  $handler->display->display_options['fields']['title']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['title']['empty_zero'] = 0;
+  $handler->display->display_options['fields']['title']['link_to_node'] = 1;
+  /* Field: Content: Nid */
+  $handler->display->display_options['fields']['nid']['id'] = 'nid';
+  $handler->display->display_options['fields']['nid']['table'] = 'node';
+  $handler->display->display_options['fields']['nid']['field'] = 'nid';
+  $handler->display->display_options['fields']['nid']['label'] = '';
+  $handler->display->display_options['fields']['nid']['exclude'] = TRUE;
+  $handler->display->display_options['fields']['nid']['alter']['alter_text'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['make_link'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['absolute'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['external'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['replace_spaces'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['trim_whitespace'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['nl2br'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['word_boundary'] = 1;
+  $handler->display->display_options['fields']['nid']['alter']['ellipsis'] = 1;
+  $handler->display->display_options['fields']['nid']['alter']['more_link'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['strip_tags'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['trim'] = 0;
+  $handler->display->display_options['fields']['nid']['alter']['html'] = 0;
+  $handler->display->display_options['fields']['nid']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['nid']['element_default_classes'] = 1;
+  $handler->display->display_options['fields']['nid']['hide_empty'] = 0;
+  $handler->display->display_options['fields']['nid']['empty_zero'] = 0;
+  $handler->display->display_options['fields']['nid']['hide_alter_empty'] = 1;
+  $handler->display->display_options['fields']['nid']['link_to_node'] = 0;
+  $handler->display->display_options['defaults']['sorts'] = FALSE;
+  $handler->display->display_options['defaults']['arguments'] = FALSE;
+  /* Contextual filter: Content: Room (field_session_room) */
+  $handler->display->display_options['arguments']['field_session_room_target_id']['id'] = 'field_session_room_target_id';
+  $handler->display->display_options['arguments']['field_session_room_target_id']['table'] = 'field_data_field_session_room';
+  $handler->display->display_options['arguments']['field_session_room_target_id']['field'] = 'field_session_room_target_id';
+  $handler->display->display_options['arguments']['field_session_room_target_id']['default_action'] = 'empty';
+  $handler->display->display_options['arguments']['field_session_room_target_id']['default_argument_type'] = 'fixed';
+  $handler->display->display_options['arguments']['field_session_room_target_id']['default_argument_skip_url'] = 0;
+  $handler->display->display_options['arguments']['field_session_room_target_id']['summary']['number_of_records'] = '0';
+  $handler->display->display_options['arguments']['field_session_room_target_id']['summary']['format'] = 'default_summary';
+  $handler->display->display_options['arguments']['field_session_room_target_id']['summary_options']['items_per_page'] = '25';
+  $handler->display->display_options['arguments']['field_session_room_target_id']['break_phrase'] = 0;
+  $handler->display->display_options['arguments']['field_session_room_target_id']['not'] = 0;
+  /* Contextual filter: Content: Time slot (field_session_slot) */
+  $handler->display->display_options['arguments']['field_session_slot_target_id']['id'] = 'field_session_slot_target_id';
+  $handler->display->display_options['arguments']['field_session_slot_target_id']['table'] = 'field_data_field_session_slot';
+  $handler->display->display_options['arguments']['field_session_slot_target_id']['field'] = 'field_session_slot_target_id';
+  $handler->display->display_options['arguments']['field_session_slot_target_id']['default_action'] = 'empty';
+  $handler->display->display_options['arguments']['field_session_slot_target_id']['default_argument_type'] = 'fixed';
+  $handler->display->display_options['arguments']['field_session_slot_target_id']['default_argument_skip_url'] = 0;
+  $handler->display->display_options['arguments']['field_session_slot_target_id']['summary']['number_of_records'] = '0';
+  $handler->display->display_options['arguments']['field_session_slot_target_id']['summary']['format'] = 'default_summary';
+  $handler->display->display_options['arguments']['field_session_slot_target_id']['summary_options']['items_per_page'] = '25';
+  $handler->display->display_options['arguments']['field_session_slot_target_id']['break_phrase'] = 0;
+  $handler->display->display_options['arguments']['field_session_slot_target_id']['not'] = 0;
+  $handler->display->display_options['defaults']['filters'] = FALSE;
+  /* Filter criterion: Content: Published */
+  $handler->display->display_options['filters']['status']['id'] = 'status';
+  $handler->display->display_options['filters']['status']['table'] = 'node';
+  $handler->display->display_options['filters']['status']['field'] = 'status';
+  $handler->display->display_options['filters']['status']['value'] = 1;
+  $handler->display->display_options['filters']['status']['group'] = 1;
+  $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
+  /* Filter criterion: Content: Type */
+  $handler->display->display_options['filters']['type']['id'] = 'type';
+  $handler->display->display_options['filters']['type']['table'] = 'node';
+  $handler->display->display_options['filters']['type']['field'] = 'type';
+  $handler->display->display_options['filters']['type']['value'] = array(
+    'bof_session' => 'bof_session',
+  );
   $export['bof_schedule'] = $view;
 
   return $export;
diff --git a/cod_session/cod_session.features.field.inc b/cod_session/cod_session.features.field.inc
index 3d1bd2f6dfe4fdd8d633f335b02e4e3e61cdabad..73a4e20c7d113cb64e10bfeb9e530250c5eb7f01 100644
--- a/cod_session/cod_session.features.field.inc
+++ b/cod_session/cod_session.features.field.inc
@@ -10,6 +10,222 @@
 function cod_session_field_default_fields() {
   $fields = array();
 
+  // Exported field: 'field_collection_item-field_room_slots_types_allowed-field_slot_types_allowed'.
+  $fields['field_collection_item-field_room_slots_types_allowed-field_slot_types_allowed'] = array(
+    'field_config' => array(
+      'active' => '1',
+      'cardinality' => '-1',
+      'deleted' => '0',
+      'entity_types' => array(),
+      'field_name' => 'field_slot_types_allowed',
+      'field_permissions' => array(
+        'type' => '0',
+      ),
+      'foreign keys' => array(),
+      'indexes' => array(
+        'value' => array(
+          0 => 'value',
+        ),
+      ),
+      'locked' => '0',
+      'module' => 'field_select_ct',
+      'settings' => array(
+        'allowed_values' => array(
+          'bof_session' => 'bof_session',
+          'schedule_item' => 'schedule_item',
+          'session' => 'session',
+        ),
+        'allowed_values_function' => '',
+      ),
+      'translatable' => '0',
+      'type' => 'list_cts',
+    ),
+    'field_instance' => array(
+      'bundle' => 'field_room_slots_types_allowed',
+      'default_value' => NULL,
+      'deleted' => '0',
+      'description' => '',
+      'display' => array(
+        'default' => array(
+          'label' => 'above',
+          'module' => 'list',
+          'settings' => array(),
+          'type' => 'list_default',
+          'weight' => 0,
+        ),
+      ),
+      'entity_type' => 'field_collection_item',
+      'field_name' => 'field_slot_types_allowed',
+      'label' => 'Allowed Schedule Types',
+      'required' => 1,
+      'settings' => array(
+        'user_register_form' => FALSE,
+      ),
+      'widget' => array(
+        'active' => 1,
+        'module' => 'options',
+        'settings' => array(),
+        'type' => 'options_select',
+        'weight' => '1',
+      ),
+    ),
+  );
+
+  // Exported field: 'field_collection_item-field_room_slots_types_allowed-field_slot_types_capacity'.
+  $fields['field_collection_item-field_room_slots_types_allowed-field_slot_types_capacity'] = array(
+    'field_config' => array(
+      'active' => '1',
+      'cardinality' => '1',
+      'deleted' => '0',
+      'entity_types' => array(),
+      'field_name' => 'field_slot_types_capacity',
+      'field_permissions' => array(
+        'type' => '0',
+      ),
+      'foreign keys' => array(),
+      'indexes' => array(),
+      'locked' => '0',
+      'module' => 'number',
+      'settings' => array(),
+      'translatable' => '0',
+      'type' => 'number_integer',
+    ),
+    'field_instance' => array(
+      'bundle' => 'field_room_slots_types_allowed',
+      'default_value' => array(
+        0 => array(
+          'value' => '1',
+        ),
+      ),
+      'deleted' => '0',
+      'description' => '',
+      'display' => array(
+        'default' => array(
+          'label' => 'above',
+          'module' => 'number',
+          'settings' => array(
+            'decimal_separator' => '.',
+            'prefix_suffix' => TRUE,
+            'scale' => 0,
+            'thousand_separator' => ' ',
+          ),
+          'type' => 'number_integer',
+          'weight' => 2,
+        ),
+      ),
+      'entity_type' => 'field_collection_item',
+      'field_name' => 'field_slot_types_capacity',
+      'label' => 'Types Capacity',
+      'required' => 1,
+      'settings' => array(
+        'max' => '',
+        'min' => '1',
+        'prefix' => '',
+        'suffix' => '',
+        'user_register_form' => FALSE,
+      ),
+      'widget' => array(
+        'active' => 0,
+        'module' => 'number',
+        'settings' => array(),
+        'type' => 'number',
+        'weight' => '3',
+      ),
+    ),
+  );
+
+  // Exported field: 'field_collection_item-field_room_slots_types_allowed-field_slot_types_time_slot'.
+  $fields['field_collection_item-field_room_slots_types_allowed-field_slot_types_time_slot'] = array(
+    'field_config' => array(
+      'active' => '1',
+      'cardinality' => '1',
+      'deleted' => '0',
+      'entity_types' => array(),
+      'field_name' => 'field_slot_types_time_slot',
+      'field_permissions' => array(
+        'type' => '0',
+      ),
+      'foreign keys' => array(
+        'node' => array(
+          'columns' => array(
+            'target_id' => 'nid',
+          ),
+          'table' => 'node',
+        ),
+      ),
+      'indexes' => array(
+        'target_id' => array(
+          0 => 'target_id',
+        ),
+      ),
+      'locked' => '0',
+      'module' => 'entityreference',
+      'settings' => array(
+        'handler' => 'base',
+        'handler_settings' => array(
+          'behaviors' => array(
+            'views-select-list' => array(
+              'status' => 0,
+            ),
+          ),
+          'sort' => array(
+            'direction' => 'ASC',
+            'field' => 'body:value',
+            'property' => 'nid',
+            'type' => 'none',
+          ),
+          'target_bundles' => array(
+            'time_slot' => 'time_slot',
+          ),
+        ),
+        'handler_submit' => 'Change handler',
+        'target_type' => 'node',
+      ),
+      'translatable' => '0',
+      'type' => 'entityreference',
+    ),
+    'field_instance' => array(
+      'bundle' => 'field_room_slots_types_allowed',
+      'default_value' => NULL,
+      'default_value_function' => '',
+      'deleted' => '0',
+      'description' => '',
+      'display' => array(
+        'default' => array(
+          'label' => 'above',
+          'module' => 'entityreference',
+          'settings' => array(
+            'link' => FALSE,
+          ),
+          'type' => 'entityreference_label',
+          'weight' => 1,
+        ),
+      ),
+      'entity_type' => 'field_collection_item',
+      'field_name' => 'field_slot_types_time_slot',
+      'label' => 'Time Slot',
+      'required' => 1,
+      'settings' => array(
+        'behaviors' => array(
+          'prepopulate' => array(
+            'action' => 'hide',
+            'fallback' => 'none',
+            'skip_perm' => 'use admin toolbar',
+            'status' => 0,
+          ),
+        ),
+        'user_register_form' => FALSE,
+      ),
+      'widget' => array(
+        'active' => 1,
+        'module' => 'options',
+        'settings' => array(),
+        'type' => 'options_select',
+        'weight' => '2',
+      ),
+    ),
+  );
+
   // Exported field: 'node-page-body'.
   $fields['node-page-body'] = array(
     'field_config' => array(
@@ -349,42 +565,44 @@ function cod_session_field_default_fields() {
     ),
   );
 
-  // Exported field: 'node-room-field_room_session_capacity'.
-  $fields['node-room-field_room_session_capacity'] = array(
+  // Exported field: 'node-room-field_room_slots_types_allowed'.
+  $fields['node-room-field_room_slots_types_allowed'] = array(
     'field_config' => array(
       'active' => '1',
-      'cardinality' => '1',
+      'cardinality' => '-1',
       'deleted' => '0',
       'entity_types' => array(),
-      'field_name' => 'field_room_session_capacity',
+      'field_name' => 'field_room_slots_types_allowed',
       'field_permissions' => array(
         'type' => '0',
       ),
       'foreign keys' => array(),
       'indexes' => array(),
       'locked' => '0',
-      'module' => 'number',
-      'settings' => array(),
+      'module' => 'field_collection',
+      'settings' => array(
+        'path' => '',
+      ),
       'translatable' => '0',
-      'type' => 'number_integer',
+      'type' => 'field_collection',
     ),
     'field_instance' => array(
       'bundle' => 'room',
-      'default_value' => NULL,
       'deleted' => '0',
-      'description' => 'Number of sessions or BoFs that this room can hold in a time slot. Used to allow multiple BoFs in the same room at the same time slot.',
+      'description' => '',
       'display' => array(
         'default' => array(
           'label' => 'above',
-          'module' => 'number',
+          'module' => 'field_collection',
           'settings' => array(
-            'decimal_separator' => '.',
-            'prefix_suffix' => TRUE,
-            'scale' => 0,
-            'thousand_separator' => ' ',
+            'add' => 'Add',
+            'delete' => 'Delete',
+            'description' => TRUE,
+            'edit' => 'Edit',
+            'view_mode' => 'full',
           ),
-          'type' => 'number_integer',
-          'weight' => '1',
+          'type' => 'field_collection_view',
+          'weight' => 4,
         ),
         'listing' => array(
           'label' => 'above',
@@ -400,22 +618,18 @@ function cod_session_field_default_fields() {
         ),
       ),
       'entity_type' => 'node',
-      'field_name' => 'field_room_session_capacity',
-      'label' => 'Session capacity',
+      'field_name' => 'field_room_slots_types_allowed',
+      'label' => 'Allowed Slot Types',
       'required' => 0,
       'settings' => array(
-        'max' => '',
-        'min' => '',
-        'prefix' => '',
-        'suffix' => '',
         'user_register_form' => FALSE,
       ),
       'widget' => array(
         'active' => 0,
-        'module' => 'number',
+        'module' => 'field_collection',
         'settings' => array(),
-        'type' => 'number',
-        'weight' => '2',
+        'type' => 'field_collection_hidden',
+        'weight' => '31',
       ),
     ),
   );
@@ -1487,6 +1701,83 @@ function cod_session_field_default_fields() {
     ),
   );
 
+  // Exported field: 'node-time_slot-field_slot_bofs'.
+  $fields['node-time_slot-field_slot_bofs'] = array(
+    'field_config' => array(
+      'active' => '1',
+      'cardinality' => '1',
+      'deleted' => '0',
+      'entity_types' => array(),
+      'field_name' => 'field_slot_bofs',
+      'field_permissions' => array(
+        'type' => '1',
+      ),
+      'foreign keys' => array(),
+      'indexes' => array(
+        'value' => array(
+          0 => 'value',
+        ),
+      ),
+      'locked' => '0',
+      'module' => 'list',
+      'settings' => array(
+        'allowed_values' => array(
+          0 => '',
+          1 => '',
+        ),
+        'allowed_values_function' => '',
+      ),
+      'translatable' => '0',
+      'type' => 'list_boolean',
+    ),
+    'field_instance' => array(
+      'bundle' => 'time_slot',
+      'default_value' => array(
+        0 => array(
+          'value' => 0,
+        ),
+      ),
+      'deleted' => '0',
+      'description' => 'Birds of a Feather (BoFs) may be scheduled during this time slot.',
+      'display' => array(
+        'default' => array(
+          'label' => 'above',
+          'settings' => array(),
+          'type' => 'hidden',
+          'weight' => '1',
+        ),
+        'listing' => array(
+          'label' => 'above',
+          'settings' => array(),
+          'type' => 'hidden',
+          'weight' => 0,
+        ),
+        'teaser' => array(
+          'label' => 'above',
+          'settings' => array(),
+          'type' => 'hidden',
+          'weight' => 0,
+        ),
+      ),
+      'entity_type' => 'node',
+      'field_name' => 'field_slot_bofs',
+      'label' => 'Allow BoFs',
+      'required' => 0,
+      'settings' => array(
+        'user_register_form' => FALSE,
+      ),
+      'widget' => array(
+        'active' => 1,
+        'module' => 'options',
+        'settings' => array(
+          'display_label' => 1,
+        ),
+        'type' => 'options_onoff',
+        'weight' => '3',
+      ),
+    ),
+  );
+
   // Exported field: 'node-time_slot-field_slot_datetime'.
   $fields['node-time_slot-field_slot_datetime'] = array(
     'field_config' => array(
@@ -1609,15 +1900,17 @@ function cod_session_field_default_fields() {
 
   // Translatables
   // Included for use with string extractors like potx.
+  t('Allow BoFs');
+  t('Allowed Schedule Types');
+  t('Allowed Slot Types');
+  t('Birds of a Feather (BoFs) may be scheduled during this time slot.');
   t('Body');
   t('Date and time');
   t('Description');
   t('Experience level');
-  t('Number of sessions or BoFs that this room can hold in a time slot. Used to allow multiple BoFs in the same room at the same time slot.');
   t('Photo');
   t('Room');
   t('Select room(s) in which the session occurs.');
-  t('Session capacity');
   t('Slides');
   t('Speaker(s)');
   t('Status');
@@ -1626,6 +1919,7 @@ function cod_session_field_default_fields() {
   t('Total capacity of the room, in persons.');
   t('Total room capacity');
   t('Track');
+  t('Types Capacity');
   t('Upload your slides here as a PDF, or link to them from the description. (This is typically done after your session.)');
 
   return $fields;
diff --git a/cod_session/cod_session.features.inc b/cod_session/cod_session.features.inc
index d71cbc49fa6737e4e5c23c4333940e59b865ab28..ce8433f6710be00a12ebb30924538947c2ea0cde 100644
--- a/cod_session/cod_session.features.inc
+++ b/cod_session/cod_session.features.inc
@@ -52,10 +52,12 @@ function cod_session_flag_default_flags() {
       ),
       'unflag' => array(),
     ),
-    'show_on_page' => 1,
-    'show_on_teaser' => 1,
+    'weight' => 0,
     'show_on_form' => 0,
     'access_author' => '',
+    'show_on_page' => 1,
+    'show_on_teaser' => 1,
+    'show_contextual_link' => FALSE,
     'i18n' => 0,
     'module' => 'cod_session',
     'locked' => array(
@@ -84,10 +86,12 @@ function cod_session_flag_default_flags() {
       'flag' => array(),
       'unflag' => array(),
     ),
-    'show_on_page' => 1,
-    'show_on_teaser' => 0,
+    'weight' => 0,
     'show_on_form' => 0,
     'access_author' => '',
+    'show_on_page' => 1,
+    'show_on_teaser' => 0,
+    'show_contextual_link' => FALSE,
     'i18n' => 0,
     'module' => 'cod_session',
     'locked' => array(
@@ -119,10 +123,12 @@ function cod_session_flag_default_flags() {
         0 => '4',
       ),
     ),
-    'show_on_page' => 1,
-    'show_on_teaser' => 0,
+    'weight' => 0,
     'show_on_form' => 0,
     'access_author' => '',
+    'show_on_page' => 1,
+    'show_on_teaser' => 0,
+    'show_contextual_link' => FALSE,
     'i18n' => 0,
     'module' => 'cod_session',
     'locked' => array(
diff --git a/cod_session/cod_session.info b/cod_session/cod_session.info
index 03bf809594b12a48094607e0286baa7025defee5..ce656fec8e4e0aecb90e734e33be6b359a1fc8be 100644
--- a/cod_session/cod_session.info
+++ b/cod_session/cod_session.info
@@ -3,15 +3,17 @@ description = COD Session Scheduling & Voting
 core = 7.x
 package = COD
 php = 5.2.4
-project = cod_session
+project = cod_support
 dependencies[] = auto_nodetitle
 dependencies[] = cod_base
 dependencies[] = date
 dependencies[] = date_popup
 dependencies[] = entityreference
 dependencies[] = features
+dependencies[] = field_collection
 dependencies[] = field_group
 dependencies[] = field_permissions
+dependencies[] = field_select_ct
 dependencies[] = flag
 dependencies[] = image
 dependencies[] = list
@@ -25,16 +27,19 @@ dependencies[] = views
 dependencies[] = views_bulk_operations
 dependencies[] = views_content
 dependencies[] = views_ui
-datestamp = 1312320179
+datestamp = 1345248603
 features[ctools][] = field_group:field_group:1
 features[ctools][] = strongarm:strongarm:1
 features[ctools][] = views:views_default:3.0
 features[features_api][] = api:1
+features[field][] = field_collection_item-field_room_slots_types_allowed-field_slot_types_allowed
+features[field][] = field_collection_item-field_room_slots_types_allowed-field_slot_types_capacity
+features[field][] = field_collection_item-field_room_slots_types_allowed-field_slot_types_time_slot
 features[field][] = node-page-body
 features[field][] = node-room-body
 features[field][] = node-room-field_room_capacity
 features[field][] = node-room-field_room_photo
-features[field][] = node-room-field_room_session_capacity
+features[field][] = node-room-field_room_slots_types_allowed
 features[field][] = node-schedule_item-body
 features[field][] = node-schedule_item-field_accepted
 features[field][] = node-schedule_item-field_session_room
@@ -47,6 +52,7 @@ features[field][] = node-session-field_session_slot
 features[field][] = node-session-field_slides
 features[field][] = node-session-field_speakers
 features[field][] = node-session-field_track
+features[field][] = node-time_slot-field_slot_bofs
 features[field][] = node-time_slot-field_slot_datetime
 features[field_group][] = group_audience|node|session|default
 features[field_group][] = group_audience|node|session|form
@@ -117,8 +123,10 @@ features[variable][] = comment_subject_field_schedule_item
 features[variable][] = comment_subject_field_session
 features[variable][] = comment_subject_field_time_slot
 features[variable][] = comment_time_slot
+features[variable][] = field_bundle_settings_node__room
 features[variable][] = field_bundle_settings_node__schedule_item
 features[variable][] = field_bundle_settings_node__session
+features[variable][] = field_bundle_settings_node__time_slot
 features[variable][] = menu_options_time_slot
 features[variable][] = menu_parent_time_slot
 features[variable][] = node_options_page
diff --git a/cod_session/cod_session.module b/cod_session/cod_session.module
index b9c940570efa19e10d00df1cfcaf8e86ae1a2f23..042cb7a7eac0cd72cee02f6abd3aec06de3a355d 100644
--- a/cod_session/cod_session.module
+++ b/cod_session/cod_session.module
@@ -108,6 +108,28 @@ function cod_session_menu() {
     'access arguments' => array(1),
     'type' => MENU_CALLBACK,
   );
+  $items['admin/conference/schedule'] = array(
+    'title' => 'Schedule Administrator',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('cod_session_scheduler_form', 2),
+    'access callback' => 'cod_session_schedule_access',
+    'access arguments' => array(1),
+    'file' => 'cod_session_scheduler.inc',
+    'type' => MENU_CALLBACK,
+  );
+  $days = cod_session_days();
+  foreach($days AS $day_format => $day) {
+    $date = new DateObject($day_format, NULL, 'l F, d Y');
+    $items['admin/conference/schedule/'.date_format_date($date, 'custom', 'Y-m-d')] = array(
+      'title' => $day,
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('cod_session_scheduler_form', 3),
+      'access callback' => 'cod_session_schedule_access',
+      'access arguments' => array(1),
+      'file' => 'cod_session_scheduler.inc',
+      'type' => MENU_LOCAL_TASK,
+    );
+  }
   return $items;
 }
 
@@ -182,6 +204,7 @@ function cod_session_save_declined_message(&$form, &$form_state) {
 function cod_session_form_alter(&$form, &$form_state, $form_id) {
   // Prepopulate the current user into the Speakers field
   // on new session creation.
+
   if ($form_id == 'session_node_form') {
     if (isset($form['field_speakers'])) {
       // Form tweaks for the Speakers field:
@@ -212,8 +235,8 @@ function cod_session_form_alter(&$form, &$form_state, $form_id) {
       // Use $_GET for room and slot.
       if (isset($_GET['edit'])) {
         // @todo does this work if the widget wasn't altered above?
-        $room_nid = $_GET['edit']['field_session_room']['nid']['nid'];
-        $slot_nid = $_GET['edit']['field_session_slot']['nid']['nid'];
+        $room_nid = $_GET['edit']['field_session_room']['target_id'];
+        $slot_nid = $_GET['edit']['field_session_slot']['target_id'];
       }
       elseif (!empty($form['#node']->nid) && !empty($form['#node']->field_session_room) && !empty($form['#node']->field_session_slot)) {
         // Get room and slot from node during node edit.
@@ -411,6 +434,17 @@ function cod_session_schedule_form($form, &$form_state, $type) {
   return $form;
 }
 
+function cod_session_get_collection_entity($room_nid, $time_nid) {
+    //first, do we have an entity?
+  $sql = "SELECT s.field_room_slots_types_allowed_value
+    FROM {field_data_field_room_slots_types_allowed} s
+    INNER JOIN {field_data_field_slot_types_time_slot} st ON s.field_room_slots_types_allowed_value = st.entity_id
+    WHERE s.entity_id = :nid AND st.field_slot_types_time_slot_target_id = :time_nid";
+  $entity_id = db_query($sql, array(':nid' => $room_nid, ':time_nid' => $time_nid))->fetchField();
+
+  return $entity_id;
+}
+
 /**
  * Submit handler for scheduling form.
  */
@@ -583,6 +617,9 @@ function cod_session_theme($existing, $type, $theme, $path) {
     'cod_session_declined_msg' => array(
       'render element' => 'msg',
     ),
+    'cod_session_scheduler_form' => array(
+  		'render element' => 'form'
+  	),
   );
 }
 
@@ -1027,7 +1064,7 @@ function template_preprocess_cod_session_schedule(&$vars) {
   $vars['rooms'] = $rooms;
   $vars['room_nids'] = $room_nids;
   $vars['show_rooms'] = $show_rooms;
-  $vars['schedule_display'] = $view->cod_schedule_display;
+  $vars['schedule_display'] = 0; //$view->cod_schedule_display;
 }
 
 /**
diff --git a/cod_session/cod_session.strongarm.inc b/cod_session/cod_session.strongarm.inc
index a07812ff97333d4abbb6432792215be4ff18f9a2..b65e70d95a543cc8c4299999718d23c04530c417 100644
--- a/cod_session/cod_session.strongarm.inc
+++ b/cod_session/cod_session.strongarm.inc
@@ -230,6 +230,29 @@ function cod_session_strongarm() {
   $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
+  $strongarm->name = 'field_bundle_settings_node__room';
+  $strongarm->value = array(
+    'view_modes' => array(),
+    'extra_fields' => array(
+      'form' => array(
+        'title' => array(
+          'weight' => '0',
+        ),
+        'path' => array(
+          'weight' => '6',
+        ),
+        'flag' => array(
+          'weight' => '10',
+        ),
+      ),
+      'display' => array(),
+    ),
+  );
+  $export['field_bundle_settings_node__room'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
   $strongarm->name = 'field_bundle_settings_node__schedule_item';
   $strongarm->value = array(
     'view_modes' => array(),
@@ -264,6 +287,48 @@ function cod_session_strongarm() {
   $strongarm = new stdClass();
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
+  $strongarm->name = 'field_bundle_settings_node__time_slot';
+  $strongarm->value = array(
+    'view_modes' => array(
+      'teaser' => array(
+        'custom_settings' => TRUE,
+      ),
+      'listing' => array(
+        'custom_settings' => TRUE,
+      ),
+      'full' => array(
+        'custom_settings' => FALSE,
+      ),
+      'rss' => array(
+        'custom_settings' => FALSE,
+      ),
+      'search_index' => array(
+        'custom_settings' => FALSE,
+      ),
+      'search_result' => array(
+        'custom_settings' => FALSE,
+      ),
+      'token' => array(
+        'custom_settings' => FALSE,
+      ),
+    ),
+    'extra_fields' => array(
+      'form' => array(
+        'title' => array(
+          'weight' => '0',
+        ),
+        'path' => array(
+          'weight' => '2',
+        ),
+      ),
+      'display' => array(),
+    ),
+  );
+  $export['field_bundle_settings_node__time_slot'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
   $strongarm->name = 'menu_options_time_slot';
   $strongarm->value = array(
     0 => 'main-menu',
diff --git a/cod_session/cod_session_scheduler.inc b/cod_session/cod_session_scheduler.inc
new file mode 100644
index 0000000000000000000000000000000000000000..b8fc90a79f7e0dd1340ddc027f4e41a0b4a57ebe
--- /dev/null
+++ b/cod_session/cod_session_scheduler.inc
@@ -0,0 +1,243 @@
+<?php
+
+/* this file works on the global scheduling system, which populates the field collection within the room CT.
+ * its needed for allocating what timeslots/room combos are allowed to host what
+ * This file is self_contained for the most part, and probably could use cleanup/merging with the session module
+ * to consolidating helper functions.
+ */
+
+/**
+ * Custom schedule form.
+ * This will build a schedule grid where you can select which rooms should have what items in it
+ * Basically this is an empty theme callback that renders the children. When someone wants to take on theming, they can do it here
+ */
+function theme_cod_session_scheduler_form($variables) {
+
+  // Isolate the form definition form the $variables array
+  $form = $variables['form'];
+  $output = '';
+  // Pass the remaining form elements through drupal_render_children()
+  $output .= drupal_render_children($form);
+  // return the output
+  return $output;
+
+}
+
+function cod_session_scheduler_form($form, &$form_state, $day) {
+
+  $time_slots = _cod_session_get_timeslots($day);
+  $room_slots = _cod_session_get_rooms();
+  //print_r($time_slots);
+ // print_r($room_slots);
+
+  //this stores the room form elements
+  $room_array = array();
+
+  //iterate through the timeslots and generate forms for each room
+  foreach($time_slots AS $time_slot) {
+    $time_slot = node_load($time_slot->nid);
+
+    $form[$time_slot->nid] = array(
+      '#type' => 'fieldset',
+      '#title' => $time_slot->title,
+      '#collapsible' => FALSE,
+      '#collapsed' => FALSE,
+    );
+    foreach($room_slots AS $room) {
+      $room = node_load($room->nid);
+      $key = cod_session_get_collection_entity($room->nid, $time_slot->nid) ? cod_session_get_collection_entity ($room->nid, $time_slot->nid) :  $room->nid .'-'. $time_slot->nid;
+      $form[$time_slot->nid][$key.'_room_name'] = array(
+        '#markup' => $room->title,
+      );
+      $form[$time_slot->nid][$room->nid][$key.'-field_slot_types_allowed'] = array(
+        '#title' => t('Allowed Types'),
+        '#type' => 'select',
+        '#options' => array(
+          'unscheduled' => t('Unscheduled'),
+          'session' => t('session'),
+          'bof_session' => t('bof_session'),
+          'schedule_item' => t('schedule_item')
+        ),
+        '#default_value' => _cod_session_get_room_slots_types_allowed($room->nid, $time_slot->nid),
+        '#required' => FALSE,
+        '#multiple' => TRUE,
+      );
+      $form[$time_slot->nid][$room->nid][$key.'-field_slot_types_capacity'] = array(
+        '#title' => t('Room Capacity'),
+        '#type' => 'textfield',
+        '#maxlength' => 4,
+        '#size' => 4,
+        '#default_value' => _cod_session_get_room_slots_types_capacity($room->nid, $time_slot->nid),
+        '#required' => FALSE,
+      );
+    }
+  }
+  $form['submit'] = array(
+    '#type' => 'submit',
+    '#value' => t('Confirm this time slot for day ' . $day),
+  );
+  $form['#validate'][] = 'cod_session_scheduler_form_validate';
+  $form['#submit'][] = 'cod_session_scheduler_form_submit';
+
+  return $form;
+
+}
+
+function cod_session_scheduler_form_validate($form, &$form_state) {
+
+  foreach($form_state['values'] AS $key => $element) {
+    if(strpos($key, 'field_room_slots_types_allowed') != FALSE  && is_array($element)) {
+      //dsm($element);
+      if(sizeof($element) > 1 && in_array('unscheduled', $element)) {
+        form_set_error('', 'You cannot select unscheduled and scheduled items at the same time');
+      }
+    }
+  }
+}
+
+/**
+ * Submit handler for scheduling form.
+ */
+function cod_session_scheduler_form_submit($form, $form_state) {
+  module_load_include('inc', 'node', 'node.pages');
+
+  error_log(print_r($form_state,true));
+  //grab our key again
+  //parse the form to see if its an entity already or if we need to create it
+  foreach($form_state['complete form'] AS $time_nid => $element) {
+    if(is_array($element) && is_numeric($time_nid)) { //we have a nid array
+     foreach($element AS $room_nid => $fields) {
+       $entity = FALSE;
+       $key = '';
+       if(cod_session_get_collection_entity($room_nid, $time_nid)) {
+         $key = cod_session_get_collection_entity($room_nid, $time_nid);
+         $entity = TRUE;
+       } else {
+         $key = $room_nid .'-'. $time_nid;
+       }
+       //dsm($fields);
+
+       if(is_numeric($room_nid) && isset($fields[$key.'-field_slot_types_allowed']) && isset($fields[$key.'-field_slot_types_capacity'])) {
+          if(in_array('unscheduled', $fields[$key.'-field_slot_types_allowed']['#value'])) {
+            if($entity == TRUE) {
+              $field_collection_item = field_collection_item_load($key); // Load that field collection item.
+              $field_collection_item->delete(); // Save field-collection item.
+              continue;
+            } else {
+              continue;
+            }
+          }
+          $node = node_load($room_nid);
+          if($entity == TRUE) {
+            // Get field collection item value.
+            $field_collection_item = field_collection_item_load($key); // Load that field collection item.
+            $delta = 0;
+            foreach($fields[$key.'-field_slot_types_allowed']['#value'] AS $element) {
+              $field_collection_item->field_slot_types_allowed[LANGUAGE_NONE][$delta]['value'] = $element;
+              $delta++;
+            }
+            $field_collection_item->field_slot_types_capacity[LANGUAGE_NONE][0]['value'] = $fields[$key.'-field_slot_types_capacity']['#value'] ? $fields[$key.'-field_slot_types_capacity']['#value'] : 1;
+            $field_collection_item->save(); // Save field-collection item.
+          } else {
+            $values = array();
+            $values['field_name'] = 'field_room_slots_types_allowed';
+            $values['field_slot_types_time_slot'][LANGUAGE_NONE][0]['target_id'] = $time_nid;
+            foreach($fields[$key.'-field_slot_types_allowed']['#value'] AS $element) {
+              $values['field_slot_types_allowed'][LANGUAGE_NONE][]['value'] = $element;
+            }
+            $values['field_slot_types_capacity'][LANGUAGE_NONE][0]['value'] = $fields[$key.'-field_slot_types_capacity']['#value'] ? $fields[$key.'-field_slot_types_capacity']['#value'] : 1;
+            $field_collection_item = entity_create('field_collection_item', $values);
+            $field_collection_item->setHostEntity('node', $node);
+            $field_collection_item->save();
+          }
+       }
+     }
+    }
+  }
+
+  /*
+  /$item = node_load($form_state['values']['session'], NULL, TRUE);
+  $item->field_session_slot['und'][0]['target_id'] = $form_state['values']['schedule']['slot']->nid;
+  $item->field_session_room['und'][0]['target_id'] = $form_state['values']['schedule']['room']->nid;
+  $item = node_submit($item);
+  node_save($item);
+  */
+}
+
+
+function _cod_session_get_timeslots($day = NULL) {
+  $time_slots = array();
+
+  // No view so default to all time slots within this day.
+  $sql = "SELECT n.nid
+    FROM {node} n
+    INNER JOIN {field_data_field_slot_datetime} s ON n.nid = s.entity_id AND n.vid = s.revision_id
+    WHERE n.type = 'time_slot' AND n.status = 1";
+  if ($day) {
+    $sql .= " AND DATE_FORMAT(s.field_slot_datetime_value, '%Y-%m-%d') = :day";
+  }
+  $sql .= " ORDER BY s.field_slot_datetime_value ASC";
+  //print_r($day);
+  $result = db_query($sql, array(':day' => $day));
+  foreach ($result as $record) {
+    $time_slots[] = $record;
+  }
+  return $time_slots;
+}
+
+function _cod_session_get_rooms() {
+  $rooms = array();
+
+  $sql = "SELECT n.nid FROM {node} n WHERE n.type = 'room'";
+  $result = db_query($sql);
+  foreach ($result as $record) {
+    $rooms[] = $record;
+  }
+  return $rooms;
+}
+
+/*
+ * Get the Entity field collection that contains the room/timeslot/allowed types combo
+ *
+ * @return false if there is none found, entity ID if found
+ */
+function _cod_session_get_room_slots_types_allowed($room_nid, $time_nid) {
+
+  $entity_id = cod_session_get_collection_entity($room_nid, $time_nid);
+  //second it looks like we do, lets make sure it has some data, and return it!
+//  print_r(" new entity id");
+//  print_r($entity_id);
+//  print_r($time_nid);
+  if(!empty($entity_id)) {
+    $sql = "SELECT sa.field_slot_types_allowed_value
+      FROM {field_data_field_slot_types_allowed} sa, {field_data_field_slot_types_time_slot} st
+      WHERE sa.entity_id = :entity_id AND st.entity_id = :entity_id AND st.field_slot_types_time_slot_target_id = :time_nid";
+    $result = db_query($sql, array('entity_id' => $entity_id, ':time_nid' => $time_nid));
+    foreach($result as $record) {
+      $return = $record->field_slot_types_allowed_value;
+      return $return;
+    }
+  } else {
+    return FALSE;
+  }
+}
+
+function _cod_session_get_room_slots_types_capacity($room_nid, $time_nid) {
+  $entity_id = cod_session_get_collection_entity($room_nid, $time_nid);
+  //second it looks like we do, lets make sure it has some data, and return it!
+//  print_r(" new entity id");
+//  print_r($entity_id);
+//  print_r($time_nid);
+  if(!empty($entity_id)) {
+    $sql = "SELECT sa.field_slot_types_capacity_value
+      FROM {field_data_field_slot_types_capacity} sa, {field_data_field_slot_types_time_slot} st
+      WHERE sa.entity_id = :entity_id AND st.entity_id = :entity_id AND st.field_slot_types_time_slot_target_id = :time_nid";
+    $result = db_query($sql, array('entity_id' => $entity_id, ':time_nid' => $time_nid));
+    foreach($result as $record) {
+      $return = $record->field_slot_types_capacity_value;
+      return $return;
+    }
+  } else {
+    return '1'; //by default we return a 1
+  }
+}
