diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 39fe1c2..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Sass cache and mapping are not needed in production.
-.sass-cache
-*.map
diff --git a/README.md b/README.md
index 698c2da..01a4f6f 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,6 @@
 ## CONTENTS OF THIS FILE
 
  * Description
- * Contributing
 
 
 ## DESCRIPTION
@@ -20,11 +19,3 @@ creating a field of the "inline_conditions" type on the entity, and later
 calling inline_conditions_build_rule() from the implementation of
 hook_default_rules_configuration(). See inline_conditions.api.php for more
 information.
-
-
-## CONTRIBUTING
-To contribute CSS fixes/improvements to this module please do so in the `sass`
-folder. This is a SASS folder and you can compile the CSS using the following
-command:
-
-```sass --watch sass:css  --style expanded```
diff --git a/css/inline_conditions.css b/css/inline_conditions.css
deleted file mode 100644
index 670b44a..0000000
--- a/css/inline_conditions.css
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * inline_conditions main css file.
- */
-/**
- * Discount conditions block.
- */
-.inline-conditions-container .form-wrapper {
-  margin: 10px;
-}
-
-.inline-conditions-container .even,
-.inline-conditions-container .odd {
-  margin-top: 2px;
-  padding: 10px 5px;
-}
-
-.inline-conditions-container .odd {
-  background-color: #eee;
-}
-
-/**
- * Condition area.
- */
-.inline-conditions-container .condition-wrapper {
-  display: block;
-  position: relative;
-}
-[dir="ltr"] .inline-conditions-container .condition-wrapper {
-  float: left;
-}
-[dir="rtl"] .inline-conditions-container .condition-wrapper {
-  float: right;
-}
-
-.inline-conditions-container .condition-wrapper .form-item label {
-  display: inline-block;
-}
-
-.inline-conditions-container .condition-wrapper .form-item .ajax-progress {
-  position: absolute;
-}
-[dir="ltr"] .inline-conditions-container .condition-wrapper .form-item .ajax-progress {
-  left: 62px;
-}
-[dir="rtl"] .inline-conditions-container .condition-wrapper .form-item .ajax-progress {
-  right: 62px;
-}
-.inline-conditions-container .condition-wrapper .form-item .ajax-progress .message {
-  display: none;
-}
-
-.inline-conditions-container .condition-logic {
-  position: relative;
-}
-
-.inline-conditions-container .condition-logic select {
-  margin-right: 10px;
-}
-[dir="ltr"] .inline-conditions-container .condition-logic select {
-  float: left;
-}
-[dir="rtl"] .inline-conditions-container .condition-logic select {
-  float: right;
-}
-
-.inline-conditions-container .remove-condition {
-  position: relative;
-}
-.inline-conditions-container .remove-condition .form-submit {
-  margin: 0 10px;
-}
-[dir="ltr"] .inline-conditions-container .remove-condition .form-submit {
-  float: left;
-}
-[dir="rtl"] .inline-conditions-container .remove-condition .form-submit {
-  float: right;
-}
-[dir="ltr"] .inline-conditions-container .remove-condition .ajax-progress .message {
-  float: left;
-  padding-left: 5px;
-}
-[dir="rtl"] .inline-conditions-container .remove-condition .ajax-progress .message {
-  float: right;
-  padding-right: 5px;
-}
-
-.inline-conditions-container .form-item {
-  margin: 0;
-}
-
-.inline-conditions-container .form-submit {
-  margin: 0;
-}
-
-.inline-conditions-container .form-submit.add-new-condition {
-  margin-top: 10px;
-}
-
-.inline-conditions-container div.condition-instructions {
-  color: #6d6d6d;
-  font-style: italic;
-  display: block;
-  font-size: smaller;
-  /* Equal to ..inline-conditions-container .condition-wrapper .form-item label width+5px */
-}
-[dir="ltr"] .inline-conditions-container div.condition-instructions {
-  margin-left: 85px;
-}
-[dir="rtl"] .inline-conditions-container div.condition-instructions {
-  margin-right: 85px;
-}
-
-.inline-conditions-container .product-taxonomy .form-type-radio {
-  display: block;
-  margin: 0;
-  padding: 0;
-}
-.inline-conditions-container .product-taxonomy .form-type-radio > label {
-  color: #6d6d6d;
-  font-style: italic;
-  font-size: smaller;
-}
-
-.commerce-discount-form .negate-condition input.form-checkbox + label::before {
-  top: inherit;
-}
-
-/*# sourceMappingURL=inline_conditions.css.map */
diff --git a/inline_conditions.field.inc b/inline_conditions.field.inc
new file mode 100644
index 0000000..cf1bf85
--- /dev/null
+++ b/inline_conditions.field.inc
@@ -0,0 +1,394 @@
+<?php
+
+/**
+ * @file
+ * Field module functionality for the Inline Conditions module.
+ */
+
+/**
+ * Implements hook_field_info().
+ */
+function inline_conditions_field_info() {
+  return array(
+    'inline_conditions' => array(
+      'label' => t('Inline conditions'),
+      'description' => t(
+        'This field stores conditions that are later added to a matching rule.'
+      ),
+      // entity_type is the type of the entity operated on by the matching rule.
+      'instance_settings' => array('entity_type' => NULL),
+      'default_widget' => 'inline_conditions',
+      'default_formatter' => 'hidden',
+      'no_ui' => TRUE,
+      'property_type' => 'inline_conditions',
+      'property_callbacks' => array('inline_conditions_field_property_callback'),
+    ),
+  );
+}
+
+/**
+ * Implements hook_field_widget_info().
+ */
+function inline_conditions_field_widget_info() {
+  return array(
+    'inline_conditions' => array(
+      'label' => t('Inline conditions'),
+      'field types' => array('inline_conditions'),
+      'behaviors' => array(
+        'multiple values' => FIELD_BEHAVIOR_CUSTOM,
+        'default value' => FIELD_BEHAVIOR_NONE,
+      ),
+      'settings' => array(),
+    ),
+  );
+}
+
+/**
+ * Implements hook_field_load().
+ *
+ * Prepare items array in order to be usable with inline_condition field widget.
+ */
+function inline_conditions_field_load($entity_type, $entities, $field, $instances, $langcode, &$items, $age) {
+  // Loop on every entities given.
+  foreach ($entities as $id => $entity) {
+    // Ensures that field is inline_conditions type.
+    if ($field['type'] == 'inline_conditions') {
+
+      foreach ($items[$id] as $delta => $item) {
+        // Ensure condition_settings is unserialised.
+        if (is_string($item['condition_settings'])) {
+          // Unserialize the field settings.
+          $item['condition_settings'] = unserialize($item['condition_settings']);
+
+          // Look up for the value of the logic operators.
+          if (isset($item['condition_settings']['condition_negate'])) {
+            $item['condition_negate'] = $item['condition_settings']['condition_negate'];
+            unset($item['condition_settings']['condition_negate']);
+          }
+          if (isset($item['condition_settings']['condition_logic_operator'])) {
+            $item['condition_logic_operator'] = $item['condition_settings']['condition_logic_operator'];
+            unset($item['condition_settings']['condition_logic_operator']);
+          }
+
+          // Replace item value.
+          $items[$id][$delta] = $item;
+        }
+      }
+    }
+  }
+}
+
+/**
+ * Implements hook_field_insert().
+ *
+ * Call inline_conditions_prepare_field_items() in order to rebuild items.
+ *
+ * @see inline_conditions_field_prepare_items()
+ */
+function inline_conditions_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  // Ensures that field is inline_conditions type.
+  if ($field['type'] == 'inline_conditions') {
+    inline_conditions_field_prepare_items($items);
+  }
+}
+
+/**
+ * Implements hook_field_update().
+ *
+ * Call inline_conditions_prepare_field_items() in order to rebuild items.
+ *
+ * @see inline_conditions_field_prepare_items()
+ */
+function inline_conditions_field_update($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  // Ensures that field is inline_conditions type.
+  if ($field['type'] == 'inline_conditions') {
+    inline_conditions_field_prepare_items($items);
+  }
+}
+
+/**
+ * Implements hook_field_is_empty().
+ */
+function inline_conditions_field_is_empty($item, $field) {
+  return empty($item['condition_name']);
+}
+
+
+/**
+ * Alter $items array and prepare it to be saved.
+ *
+ * Serialize the condition_settings column.
+ *
+ * @param array $items
+ *   A referenced array of field items.
+ *
+ * @see inline_conditions_field_load()
+ * @see inline_conditions_field_insert()
+ */
+function inline_conditions_field_prepare_items(&$items) {
+  // A simple way to check if array is a multi-dimensional array.
+  if (is_array($items)) {
+    foreach ($items as $delta => $item) {
+      // Ensures that $item has a condition name.
+      if (!empty($item['condition_name'])) {
+        // Ensure that condition_settings is not serialized.
+        if (is_array($item['condition_settings'])) {
+          $item['condition_settings'] = serialize(
+            array_merge(
+              $item['condition_settings'], array(
+                // Store the rule condition logic operators.
+                'condition_negate' => isset($item['condition_negate']) ? $item['condition_negate'] : NULL,
+                'condition_logic_operator' => isset($item['condition_logic_operator']) ? $item['condition_logic_operator'] : NULL,
+              )
+            )
+          );
+        }
+        // Replace item value.
+        $items[$delta] = $item;
+      }
+    }
+  }
+}
+
+/**
+ * Implements hook_field_widget_form().
+ */
+function inline_conditions_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
+  // Ensure this .inline_conditions files are loaded when the form is rebuilt
+  // from the cache.
+  foreach (inline_conditions_get_info_by_module() as $module => $condition) {
+    $form_state['build_info']['files']["form_ic_$module"] = drupal_get_path('module', $module) . "/$module.inline_conditions.inc";
+  }
+
+  // Prepare a list of all possible conditions.
+  $condition_info = inline_conditions_get_info_by_type(empty($instance['settings']['entity_type']) ? 'commerce_order' : $instance['settings']['entity_type'], $instance['entity_type']);
+
+  // Build main wrapper id.
+  $main_wrapper_id = sprintf('inline-conditions-%s', $field['field_name']);
+
+  $element = array(
+      '#type' => 'container',
+      '#id' => $main_wrapper_id,
+      '#caption' => $element['#title'],
+      '#theme' => 'inline_conditions_table',
+      '#element_validate' => array('inline_conditions_field_widget_form_validate'),
+    ) + $element;
+
+  // Remove none numerical keys from items array.
+  $items = array_intersect_key($items, array_flip(array_filter(array_keys($items), 'is_numeric')));
+
+  // If "Add a new condition" button has been pressed.
+  if (isset($form_state['triggering_element']['#condition_action'])) {
+    switch ($form_state['triggering_element']['#condition_action']) {
+      case 'and':
+        $items[] = array(
+          'condition_name' => '',
+          'condition_settings' => array(),
+          'condition_logic_operator' => INLINE_CONDITIONS_AND,
+        );
+        break;
+      case 'or':
+        $items[] = array(
+          'condition_name' => '',
+          'condition_settings' => array(),
+          'condition_logic_operator' => INLINE_CONDITIONS_OR,
+        );
+        break;
+      case 'remove':
+        unset($items[$form_state['triggering_element']['#element_delta']]);
+        // Rebuild array keys.
+        $items = array_values($items);
+        break;
+    }
+  }
+
+  // If no items found, create an empty item for display purposes.
+  if (empty($items)) {
+    $items[] = array('condition_name' => '', 'condition_settings' => array());
+  }
+
+  foreach ($items as $delta => $item) {
+    $settings_wrapper_id = sprintf('inline-conditions-settings-wrapper-%s-%s', $instance['id'], $delta);
+
+    // Condition selector.
+    $element[$delta]['condition_name'] = array(
+      '#type' => 'select',
+      '#options' => inline_conditions_options_list($condition_info),
+      '#default_value' => $item['condition_name'],
+      '#ajax' => array(
+        'callback' => 'inline_conditions_form_ajax_callback',
+        'wrapper' => $settings_wrapper_id,
+      ),
+      '#condition_action' => 'select',
+      // Identifies the condition operated upon.
+      '#element_delta' => $delta,
+      '#limit_validation_errors' => array(),
+    );
+
+    // Condition settings.
+    $element[$delta]['condition_settings'] = array(
+      '#type' => 'value',
+      '#value' => array(),
+    );
+
+    // A condition has been selected, and a "configure" callback exists. Fills
+    // up the condition_settings key with form elements returned by condition
+    // configure callback.
+    if (!empty($item['condition_name']) && !empty($condition_info[$item['condition_name']]['callbacks']['configure'])) {
+      $callback = $condition_info[$item['condition_name']]['callbacks']['configure'];
+      $element[$delta]['condition_settings'] = $callback($item['condition_settings'], $instance, $delta);
+      $element[$delta]['#attributes'] = array('class' => array('container-inline'));
+    }
+
+    // Merge additional properties for the ajax wrapping.
+    $element[$delta]['condition_settings'] += array(
+      '#prefix' => sprintf('<div id="%s">', $settings_wrapper_id),
+      '#suffix' => '</div>',
+    );
+
+    $element[$delta]['condition_negate'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Negate'),
+      '#default_value' => !empty($item['condition_negate']) ? $item['condition_negate'] : FALSE,
+    );
+
+    // Remove condition button.
+    $element[$delta]['remove_condition'] = array(
+      '#type' => 'button',
+      '#name' => $field['field_name'] . '-' . $instance['id'] . '-' . $delta . '-remove_condition',
+      '#value' => t('Remove'),
+      '#ajax' => array(
+        'callback' => 'inline_conditions_form_ajax_callback',
+        'wrapper' => 'inline-conditions-' . $field['field_name'],
+        'effect' => 'fade',
+      ),
+      '#element_delta' => $delta,
+      '#condition_action' => 'remove',
+      '#executes_submit_callback' => FALSE,
+      '#limit_validation_errors' => array(),
+    );
+
+    // Add an option list to select logical disjunctions for each inline
+    // condition.
+    if ($delta > 0) {
+      // Add an option list to select the logic operator for the current
+      // condition.
+      $element[$delta]['condition_logic_operator'] = array(
+        '#type' => 'select',
+        '#options' => array(
+          INLINE_CONDITIONS_OR => t('Or:'),
+          INLINE_CONDITIONS_AND => t('And:'),
+        ),
+        '#default_value' => isset($item['condition_logic_operator']) ? $item['condition_logic_operator'] : INLINE_CONDITIONS_AND,
+        '#weight' => -50,
+      );
+    }
+  }
+
+  // Prepare the action buttons.
+  $element['and_condition'] = array(
+    '#type' => 'button',
+    '#name' => sprintf('%s-%s-and-condition', $field['field_name'], $instance['id']),
+    '#value' => t('Attach AND condition'),
+    '#ajax' => array(
+      'callback' => 'inline_conditions_form_ajax_callback',
+      'wrapper' => $main_wrapper_id,
+      'effect' => 'fade',
+    ),
+    '#attributes' => array('class' => array('and-condition')),
+    '#element_delta' => $element['#delta'],
+    '#condition_action' => 'and',
+    '#limit_validation_errors' => array(),
+  );
+  $element['or_condition'] = array(
+    '#type' => 'button',
+    '#name' => sprintf('%s-%s-or-condition', $field['field_name'], $instance['id']),
+    '#value' => t('Attach OR condition'),
+    '#ajax' => array(
+      'callback' => 'inline_conditions_form_ajax_callback',
+      'wrapper' => $main_wrapper_id,
+      'effect' => 'fade',
+    ),
+    '#attributes' => array('class' => array('or-condition')),
+    '#element_delta' => $element['#delta'],
+    '#condition_action' => 'or',
+    '#limit_validation_errors' => array(),
+  );
+
+  return $element;
+}
+
+/**
+ * Callback : Validate inline_conditions_field_widget_form.
+ *
+ * @param array $element
+ *   A form element array containing basic properties for the widget:
+ *   - #entity_type: The name of the entity the field is attached to.
+ *   - #bundle: The name of the field bundle the field is contained in.
+ *   - #field_name: The name of the field.
+ *   - #language: The language the field is being edited in.
+ *   - #field_parents: The 'parents' space for the field in the form. Most
+ *       widgets can simply overlook this property. This identifies the
+ *       location where the field values are placed within
+ *       $form_state['values'], and is used to access processing information
+ *       for the field through the field_form_get_state() and
+ *       field_form_set_state() functions.
+ *   - #columns: A list of field storage columns of the field.
+ *   - #title: The sanitized element label for the field instance, ready for
+ *     output.
+ *   - #description: The sanitized element description for the field instance,
+ *     ready for output.
+ *   - #required: A Boolean indicating whether the element value is required;
+ *     for required multiple value fields, only the first widget's values are
+ *     required.
+ *   - #delta: The order of this item in the array of subelements; see $delta
+ *     above.
+ * @param array $form_state
+ *   An associative array containing the current state of the form.
+ * @param array $form
+ *   The form structure where widgets are being attached to. This might be a
+ *   full form structure, or a sub-element of a larger form.
+ *
+ * @return bool
+ *   Return a boolean to validate or not form elements.
+ */
+function inline_conditions_field_widget_form_validate($element, &$form_state, $form) {
+  // Support removing the conditions from the entity.
+  if (isset($form_state['triggering_element']['#condition_action']) && $form_state['triggering_element']['#condition_action'] == 'remove') {
+    $element['#parents'][] = $form_state['triggering_element']['#element_delta'];
+    drupal_array_set_nested_value($form_state['values'], $element['#parents'], array(), TRUE);
+    drupal_array_set_nested_value($form_state['input'], $element['#parents'], array(), TRUE);
+  }
+
+  // Remove action buttons values from form state values.
+  $value = drupal_array_get_nested_value($form_state['values'], $element['#parents']);
+  $value = array_intersect_key($value, array_flip(array_filter(array_keys($value), 'is_numeric')));
+  drupal_array_set_nested_value($form_state['values'], $element['#parents'], $value, TRUE);
+}
+
+/**
+ * Ajax callback for the Inline Conditions form elements.
+ *
+ * @param array $form
+ *   The form array.
+ * @param array &$form_state
+ *   The reference of form_state array.
+ *
+ * @return array
+ *   Return form element to display.
+ */
+function inline_conditions_form_ajax_callback($form, &$form_state) {
+  $element_parents = array_slice($form_state['triggering_element']['#array_parents'], 0, -2);
+  $element = drupal_array_get_nested_value($form, $element_parents);
+
+  // Triggered when user selects a condition.
+  if ($form_state['triggering_element']['#condition_action'] == 'select') {
+    $delta = $form_state['triggering_element']['#element_delta'];
+    // We are returning the condition settings because it's a dynamic element,
+    // other elements don't need to be refreshed.
+    return $element[$delta]['condition_settings'];
+  }
+  else {
+    return $element;
+  }
+}
diff --git a/inline_conditions.module b/inline_conditions.module
index ed85461..4d975a3 100644
--- a/inline_conditions.module
+++ b/inline_conditions.module
@@ -1,13 +1,17 @@
 <?php
 /**
  * @file
- * Manage frequently used conditions directly on the relevant form.
+ * Extends Drupal 7 with a new field type to manage rules conditions directly
+ * from a field.
  */
 
 // Inline conditions own constants.
 define('INLINE_CONDITIONS_AND', 1);
 define('INLINE_CONDITIONS_OR', 0);
 
+// Load all Field module hooks for Inline Conditions.
+module_load_include('inc', 'inline_conditions', 'inline_conditions.field');
+
 /**
  * Implements hook_menu().
  */
@@ -26,6 +30,86 @@ function inline_conditions_menu() {
 }
 
 /**
+ * Implements hook_theme().
+ */
+function inline_conditions_theme($existing, $type, $theme, $path) {
+  return array(
+    'inline_conditions_table' => array(
+      'render element' => 'element',
+    )
+  );
+}
+
+/**
+ * Returns HTML for an individual inline conditions widget.
+ *
+ * @param array $variables
+ *   An associative array containing:
+ *   - element: A render element representing the widget.
+ *
+ * @ingroup themeable
+ *
+ * @return string
+ *   The HTML to be rendered.
+ */
+function theme_inline_conditions_table($variables) {
+  $element = $variables['element'];
+
+  // Initialize the variable which will store our table rows.
+  foreach (element_children($element) as $key) {
+    if (is_numeric($key) && $key > 0) {
+      // Render the logical operator form element and pop it into the upper row.
+      $rows[] = array(
+        'data' => array(
+          array(
+            'data' => drupal_render_children($element[$key], array('condition_logic_operator')),
+            'colspan' => 4,
+          )
+        )
+      );
+    }
+
+    if (is_numeric($key)) {
+      $rows[] = array(
+        'data' => array(
+          // Column: "Apply to".
+          drupal_render_children($element[$key], array('condition_name')),
+          // Column: "Settings".
+          drupal_render_children($element[$key], array('condition_settings')),
+          // Column: "Negate".
+          drupal_render_children($element[$key], array('condition_negate')),
+          // Column: "Remove".
+          drupal_render_children($element[$key], array('remove_condition')),
+        )
+      );
+    }
+  }
+
+  // Render action buttons.
+  $rows[] = array(
+    'data' => array(
+      array(
+        'data' => drupal_render_children($element, array(
+          'and_condition',
+          'or_condition'
+        )),
+        'colspan' => 4,
+      )
+    )
+  );
+
+  return theme_table(array(
+    'header' => array(t('Apply to'), t('Settings'), t('Negate'), t('Remove')),
+    'rows' => isset($rows) ? $rows : array(),
+    'attributes' => array(),
+    'caption' => isset($element['#caption']) ? $element['#caption'] : NULL,
+    'colgroups' => NULL,
+    'sticky' => NULL,
+    'empty' => NULL
+  ));
+}
+
+/**
  * Implements hook_modules_enabled().
  */
 function inline_conditions_modules_enabled() {
@@ -192,44 +276,6 @@ function _inline_conditions_autocomplete_validate($element, &$form_state, $form)
 }
 
 /**
- * Implements hook_field_info().
- */
-function inline_conditions_field_info() {
-  return array(
-    'inline_conditions' => array(
-      'label' => t('Inline conditions'),
-      'description' => t(
-        'This field stores conditions that are later added to a matching rule.'
-      ),
-      // entity_type is the type of the entity operated on by the matching rule.
-      'instance_settings' => array('entity_type' => NULL),
-      'default_widget' => 'inline_conditions',
-      'default_formatter' => 'hidden',
-      'no_ui' => TRUE,
-      'property_type' => 'inline_conditions',
-      'property_callbacks' => array('inline_conditions_field_property_callback'),
-    ),
-  );
-}
-
-/**
- * Implements hook_field_widget_info().
- */
-function inline_conditions_field_widget_info() {
-  return array(
-    'inline_conditions' => array(
-      'label' => t('Inline conditions'),
-      'field types' => array('inline_conditions'),
-      'behaviors' => array(
-        'multiple values' => FIELD_BEHAVIOR_CUSTOM,
-        'default value' => FIELD_BEHAVIOR_NONE,
-      ),
-      'settings' => array(),
-    ),
-  );
-}
-
-/**
  * Property callback for IC module.
  */
 function inline_conditions_field_property_callback(&$info, $entity_type, $field, $instance, $field_type) {
@@ -238,7 +284,7 @@ function inline_conditions_field_property_callback(&$info, $entity_type, $field,
   entity_metadata_field_default_property_callback($info, $entity_type, $field, $instance, $field_type);
 
   // Alter both getter & setter callbacks.
-  $property = & $info[$entity_type]['bundles'][$instance['bundle']]['properties'][$field['field_name']];
+  $property =& $info[$entity_type]['bundles'][$instance['bundle']]['properties'][$field['field_name']];
   $property['getter callback'] = 'inline_conditions_entity_metadata_field_property_get';
   $property['setter callback'] = 'inline_conditions_entity_metadata_field_property_set';
 }
@@ -284,341 +330,6 @@ function inline_conditions_entity_metadata_field_property_set($entity, $name, $v
   drupal_static_reset('field_language');
 }
 
-
-/**
- * Implements hook_field_load().
- *
- * Prepare items array in order to be usable with inline_condition field widget.
- */
-function inline_conditions_field_load($entity_type, $entities, $field, $instances, $langcode, &$items, $age) {
-  // Loop on every entities given.
-  foreach ($entities as $id => $entity) {
-    // Ensures that field is inline_conditions type.
-    if ($field['type'] == 'inline_conditions') {
-
-      foreach ($items[$id] as $delta => $item) {
-        // Ensure condition_settings is unserialised.
-        if (is_string($item['condition_settings'])) {
-          // Unserialize the field settings.
-          $item['condition_settings'] = unserialize($item['condition_settings']);
-
-          // Look up for the value of the logic operators.
-          if (isset($item['condition_settings']['condition_negate'])) {
-            $item['condition_negate'] = $item['condition_settings']['condition_negate'];
-            unset($item['condition_settings']['condition_negate']);
-          }
-          if (isset($item['condition_settings']['condition_logic_operator'])) {
-            $item['condition_logic_operator'] = $item['condition_settings']['condition_logic_operator'];
-            unset($item['condition_settings']['condition_logic_operator']);
-          }
-
-          // Replace item value.
-          $items[$id][$delta] = $item;
-        }
-      }
-    }
-  }
-}
-
-/**
- * Implements hook_field_insert().
- *
- * Call inline_conditions_prepare_field_items() in order to rebuild items.
- *
- * @see inline_conditions_field_prepare_items()
- */
-function inline_conditions_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) {
-  // Ensures that field is inline_conditions type.
-  if ($field['type'] == 'inline_conditions') {
-    inline_conditions_field_prepare_items($items);
-  }
-}
-
-/**
- * Implements hook_field_update().
- *
- * Call inline_conditions_prepare_field_items() in order to rebuild items.
- *
- * @see inline_conditions_field_prepare_items()
- */
-function inline_conditions_field_update($entity_type, $entity, $field, $instance, $langcode, &$items) {
-  // Ensures that field is inline_conditions type.
-  if ($field['type'] == 'inline_conditions') {
-    inline_conditions_field_prepare_items($items);
-  }
-}
-
-/**
- * Implements hook_field_is_empty().
- */
-function inline_conditions_field_is_empty($item, $field) {
-  return empty($item['condition_name']);
-}
-
-
-/**
- * Alter $items array and prepare it to be saved.
- *
- * Serialize the condition_settings column.
- *
- * @param array $items
- *   A referenced array of field items.
- *
- * @see inline_conditions_field_load()
- * @see inline_conditions_field_insert()
- */
-function inline_conditions_field_prepare_items(&$items) {
-  // A simple way to check if array is a multi-dimensional array.
-  if (is_array($items)) {
-    foreach ($items as $delta => $item) {
-      // Ensures that $item has a condition name.
-      if (!empty($item['condition_name'])) {
-        // Ensure that condition_settings is not serialized.
-        if (is_array($item['condition_settings'])) {
-          $item['condition_settings'] = serialize(
-            array_merge(
-              $item['condition_settings'], array(
-                // Store the rule condition logic operators.
-                'condition_negate' => isset($item['condition_negate']) ? $item['condition_negate'] : NULL,
-                'condition_logic_operator' => isset($item['condition_logic_operator']) ? $item['condition_logic_operator'] : NULL,
-              )
-            )
-          );
-        }
-        // Replace item value.
-        $items[$delta] = $item;
-      }
-    }
-  }
-}
-
-/**
- * Implements hook_field_widget_form().
- */
-function inline_conditions_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
-  // Ensure this .inline_conditions files are loaded when the form is rebuilt
-  // from the cache.
-  foreach (inline_conditions_get_info_by_module() as $module => $condition) {
-    $form_state['build_info']['files']["form_ic_$module"] = drupal_get_path('module', $module) . "/$module.inline_conditions.inc";
-  }
-
-  // Get entity_type setting from the current instance.
-  $entity_type_setting = empty($instance['settings']['entity_type']) ? 'commerce_order' : $instance['settings']['entity_type'];
-
-  // Prepare a list of all possible conditions.
-  $condition_info = inline_conditions_get_info_by_type($entity_type_setting, $instance['entity_type']);
-  $condition_list = array('' => t('- All -'));
-  foreach ($condition_info as $condition_name => $info) {
-    $condition_list[$condition_name] = $info['label'];
-  }
-
-  $element = array(
-      '#type' => 'container',
-      '#prefix' => '<div class="inline-conditions-container" id="inline-conditions-' . $field['field_name'] . '"><label>' . $element['#title'] . '</label>',
-      '#suffix' => '</div>',
-      '#element_validate' => array('inline_conditions_field_widget_form_validate'),
-    ) + $element;
-
-  // Attach module cascade style sheet to inline_conditions_field_widget_form.
-  $form['#attached']['css'][] = drupal_get_path('module', 'inline_conditions') . '/css/inline_conditions.css';
-
-
-  // If "Add a new condition" button has been pressed.
-  if (isset($form_state['triggering_element']['#condition_action'])) {
-    if ($form_state['triggering_element']['#condition_action'] == 'add') {
-      // Ensure we are on the right row.
-      $items[] = array(
-        'condition_name' => '',
-        'condition_settings' => array(),
-      );
-    }
-    // If "Remove" button has been pressed.
-    elseif ($form_state['triggering_element']['#condition_action'] == 'remove') {
-      $condition_id = $form_state['triggering_element']['#element_delta'];
-      unset($items[$condition_id]);
-      // Rebuild array keys.
-      $items = array_values($items);
-    }
-  }
-
-  // If no items found, create an empty item for display purposes.
-  if (empty($items)) {
-    $items[] = array('condition_name' => '', 'condition_settings' => array());
-  }
-
-  foreach ($items as $delta => $item) {
-    $id = 'inline-conditions-' . $field['field_name'] . '-' . $instance['id'] . '-' . $delta;
-    $zebra = ($delta % 2) ? 'odd' : 'even';
-    $element[$delta] = array(
-      '#type' => 'container',
-      '#prefix' => '<div id="' . $id . '" class="container-inline ' . $field['field_name'] . ' ' . $zebra . ' clearfix ' . drupal_clean_css_identifier($item['condition_name']) . '">',
-      '#suffix' => '</div>',
-    );
-
-    // Condition selector.
-    $element[$delta]['condition_name'] = array(
-      '#type' => 'select',
-      '#title' => t('Apply to:'),
-      '#options' => $condition_list,
-      '#default_value' => $item['condition_name'],
-      '#ajax' => array(
-        'callback' => 'inline_conditions_form_ajax_callback',
-        'wrapper' => $id,
-      ),
-      '#prefix' => '<div class="condition-wrapper">',
-      '#condition_action' => 'select',
-      // Identifies the condition operated upon.
-      '#element_delta' => $delta,
-    );
-
-    $element[$delta]['condition_settings'] = array(
-      '#type' => 'value',
-      '#value' => array(),
-    );
-
-    // A condition has been selected, and a "configure" callback exists.
-    if (!empty($item['condition_name']) && !empty($condition_info[$item['condition_name']]['callbacks']['configure'])) {
-      $callback = $condition_info[$item['condition_name']]['callbacks']['configure'];
-      $element[$delta]['condition_settings'] = $callback($item['condition_settings'], $instance, $delta);
-      $element[$delta]['#attributes'] = array('class' => array('container-inline'));
-    }
-
-    $element[$delta]['condition_negate'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Negate'),
-      '#default_value' => !empty($item['condition_negate']) ? $item['condition_negate'] : FALSE,
-      '#prefix' => '<div class="negate-condition">',
-      '#suffix' => '</div>',
-    );
-
-    // Remove condition button.
-    $element[$delta]['remove_condition'] = array(
-      '#type' => 'button',
-      '#name' => $field['field_name'] . '-' . $instance['id'] . '-' . $delta . '-remove_condition',
-      '#value' => t('Remove'),
-      '#ajax' => array(
-        'callback' => 'inline_conditions_form_ajax_callback',
-        'wrapper' => 'inline-conditions-' . $field['field_name'],
-        'effect' => 'fade',
-      ),
-      // closing condition-wrapper div.
-      '#prefix' => '</div><div class="remove-condition">',
-      '#suffix' => '</div>',
-      '#element_delta' => $delta,
-      '#condition_action' => 'remove',
-      '#executes_submit_callback' => FALSE,
-      '#limit_validation_errors' => array(),
-    );
-
-    // Add an option list to select logical disjunctions for each inline
-    // condition.
-    if ($delta > 0) {
-      // Remove the default condition selector label and also remove the prefix
-      // used as HTML wrapper for the current condition.
-      unset($element[$delta]['condition_name']['#title'], $element[$delta]['condition_name']['#prefix']);
-      // Add an option list to select the logic operator for the current
-      // condition.
-      $element[$delta]['condition_logic_operator'] = array(
-        '#type' => 'select',
-        '#options' => array(
-          INLINE_CONDITIONS_OR => t('Or:'),
-          INLINE_CONDITIONS_AND => t('And:'),
-        ),
-        '#default_value' => isset($item['condition_logic_operator']) ? $item['condition_logic_operator'] : INLINE_CONDITIONS_AND,
-        '#weight' => -50,
-        '#prefix' => '<div class="condition-wrapper">',
-      );
-    }
-  }
-
-  // Add the "Add another" button.
-  $element['add_more'] = array(
-    '#type' => 'button',
-    '#name' => $field['field_name'] . '-' . $instance['id'] . '-add_condition',
-    '#value' => t('Add a new condition'),
-    '#ajax' => array(
-      'callback' => 'inline_conditions_form_ajax_callback',
-      'wrapper' => 'inline-conditions-' . $field['field_name'],
-      'effect' => 'fade',
-    ),
-    '#attributes' => array('class' => array('add-new-condition')),
-    '#element_delta' => $element['#delta'],
-    '#condition_action' => 'add',
-    '#limit_validation_errors' => array(),
-  );
-
-  return $element;
-}
-
-/**
- * Callback : Validate inline_conditions_field_widget_form.
- *
- * @param array $element
- *   A form element array containing basic properties for the widget:
- *   - #entity_type: The name of the entity the field is attached to.
- *   - #bundle: The name of the field bundle the field is contained in.
- *   - #field_name: The name of the field.
- *   - #language: The language the field is being edited in.
- *   - #field_parents: The 'parents' space for the field in the form. Most
- *       widgets can simply overlook this property. This identifies the
- *       location where the field values are placed within
- *       $form_state['values'], and is used to access processing information
- *       for the field through the field_form_get_state() and
- *       field_form_set_state() functions.
- *   - #columns: A list of field storage columns of the field.
- *   - #title: The sanitized element label for the field instance, ready for
- *     output.
- *   - #description: The sanitized element description for the field instance,
- *     ready for output.
- *   - #required: A Boolean indicating whether the element value is required;
- *     for required multiple value fields, only the first widget's values are
- *     required.
- *   - #delta: The order of this item in the array of subelements; see $delta
- *     above.
- * @param array $form_state
- *   An associative array containing the current state of the form.
- * @param array $form
- *   The form structure where widgets are being attached to. This might be a
- *   full form structure, or a sub-element of a larger form.
- *
- * @return bool
- *   Return a boolean to validate or not form elements.
- */
-function inline_conditions_field_widget_form_validate($element, &$form_state, $form) {
-  // Support removing the conditions from the entity.
-  if (isset($form_state['triggering_element']['#condition_action']) && $form_state['triggering_element']['#condition_action'] == 'remove') {
-    $element['#parents'][] = $form_state['triggering_element']['#element_delta'];
-    drupal_array_set_nested_value($form_state['values'], $element['#parents'], array(), TRUE);
-    drupal_array_set_nested_value($form_state['input'], $element['#parents'], array(), TRUE);
-  }
-}
-
-/**
- * Ajax callback for the Inline Conditions form elements.
- *
- * @param array $form
- *   The form array.
- * @param array &$form_state
- *   The reference of form_state array.
- *
- * @return array
- *   Return form element to display.
- */
-function inline_conditions_form_ajax_callback($form, &$form_state) {
-  $element_parents = array_slice($form_state['triggering_element']['#array_parents'], 0, -2);
-  $element = drupal_array_get_nested_value($form, $element_parents);
-
-  // Triggered when user selects a condition.
-  if ($form_state['triggering_element']['#condition_action'] == 'select') {
-    $delta = $form_state['triggering_element']['#element_delta'];
-
-    return $element[$delta];
-  }
-  else {
-    return $element;
-  }
-}
-
 /**
  * Defines a callback to add condition(s) to the given rule.
  *
@@ -726,7 +437,7 @@ function inline_conditions_build(RulesReactionRule $rule, $field_values) {
  *   An array of conditions.
  */
 function inline_conditions_get_info($condition_name = NULL) {
-  $conditions = & drupal_static(__FUNCTION__);
+  $conditions = &drupal_static(__FUNCTION__);
 
   if (!isset($conditions)) {
     $conditions = array();
@@ -818,3 +529,21 @@ function inline_conditions_get_info_by_module($module = NULL) {
 
   return $filtered_conditions;
 }
+
+/**
+ * Returns an options list of inline conditions per type.
+ *
+ * @param array $condition_info
+ *   An array of inline conditions.
+ *
+ * @return array
+ *   An array of inline conditions keyed by condition machine name.
+ */
+function inline_conditions_options_list($condition_info) {
+  // Complete an array ready to be used as value for a select form element.
+  $condition_list = array('' => t('- All -'));
+  foreach ($condition_info as $condition_name => $info) {
+    $condition_list[$condition_name] = $info['label'];
+  }
+  return $condition_list;
+}
diff --git a/sass/inline_conditions.scss b/sass/inline_conditions.scss
deleted file mode 100644
index db1f555..0000000
--- a/sass/inline_conditions.scss
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * inline_conditions main css file.
- */
-
-/**
- * Discount conditions block.
- */
-.inline-conditions-container .form-wrapper {
-  margin: 10px;
-}
-
-.inline-conditions-container .even,
-.inline-conditions-container .odd {
-  margin-top: 2px;
-  padding: 10px 5px;
-}
-
-.inline-conditions-container .odd {
-  background-color: #eee;
-}
-
-/**
- * Condition area.
- */
-.inline-conditions-container .condition-wrapper {
-  display: block;
-
-  [dir="ltr"] & {
-    float: left;
-  }
-
-  [dir="rtl"] & {
-    float: right;
-  }
-
-  position: relative;
-}
-
-.inline-conditions-container .condition-wrapper .form-item label {
-  display: inline-block;
-}
-
-// Throbber.
-.inline-conditions-container .condition-wrapper .form-item .ajax-progress {
-  position: absolute;
-
-  [dir="ltr"] & {
-    left: 62px;
-  }
-
-  [dir="rtl"] & {
-    right: 62px;
-  }
-
-  & .message {
-    display: none;
-  }
-}
-
-.inline-conditions-container .condition-logic {
-  position: relative;
-}
-
-.inline-conditions-container .condition-logic select {
-  [dir="ltr"] & {
-    float: left;
-  }
-
-  [dir="rtl"] & {
-    float: right;
-  }
-
-  margin-right: 10px;
-}
-
-.inline-conditions-container .remove-condition {
-  position: relative;
-
-  & .form-submit {
-    [dir="ltr"] & {
-      float: left;
-    }
-
-    [dir="rtl"] & {
-      float: right;
-    }
-
-    margin: 0 10px;
-  }
-
-  & .ajax-progress .message {
-    [dir="ltr"] & {
-      float: left;
-      padding-left: 5px;
-    }
-
-    [dir="rtl"] & {
-      float: right;
-      padding-right: 5px;
-    }
-  }
-}
-
-// Order conditions.
-.inline-conditions-container .form-item {
-  margin: 0;
-}
-
-.inline-conditions-container .form-submit {
-  margin: 0;
-}
-
-.inline-conditions-container .form-submit.add-new-condition {
-  margin-top: 10px;
-}
-
-.inline-conditions-container div.condition-instructions {
-  color: #6d6d6d;
-  font-style: italic;
-  display: block;
-  font-size: smaller;
-
-  /* Equal to ..inline-conditions-container .condition-wrapper .form-item label width+5px */
-
-  [dir="ltr"] & {
-    margin-left: 85px;
-  }
-
-  [dir="rtl"] & {
-    margin-right: 85px;
-  }
-}
-
-.inline-conditions-container .product-taxonomy .form-type-radio {
-  display: block;
-  margin: 0;
-  padding: 0;
-
-  & > label {
-    color: #6d6d6d;
-    font-style: italic;
-    font-size: smaller;
-  }
-}
-
-.commerce-discount-form .negate-condition input.form-checkbox + label::before {
-  top: inherit;
-}
