diff --git a/apachesolr.admin.inc b/apachesolr.admin.inc
index dffd9a6..425bedc 100644
--- a/apachesolr.admin.inc
+++ b/apachesolr.admin.inc
@@ -343,13 +343,6 @@ function apachesolr_settings($form, &$form_state) {
     '#description' => t('The maximum number of items indexed in each pass of a <a href="@cron">cron maintenance task</a>. If necessary, reduce the number of items to prevent timeouts and memory errors while indexing.', array('@cron' => url('admin/reports/status')))
   );
 
-  $form['advanced']['apachesolr_rows'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Results per page'),
-    '#default_value' => variable_get('apachesolr_rows', 10),
-    '#description' => t('The number of results that will be shown per page.'),
-  );
-
   $options = array('apachesolr:show_error' => t('Show error message'));
   $system_info = system_get_info('module');
   foreach (search_get_info() as $module => $search_info) {
@@ -359,6 +352,7 @@ function apachesolr_settings($form, &$form_state) {
     }
     $options[$module] = t('Show @name search results', array('@name' => $system_info[$module]['name']));
   }
+
   $options['apachesolr:show_no_results'] = t('Show no results');
   $form['advanced']['apachesolr_failure'] = array(
     '#type' => 'select',
diff --git a/apachesolr.module b/apachesolr.module
index ddc096a..304dacc 100644
--- a/apachesolr.module
+++ b/apachesolr.module
@@ -222,6 +222,7 @@ function apachesolr_init() {
  */
 function apachesolr_facetapi_searcher_info() {
   $info = array();
+  //TODO: is it needed to return all of them here?
   foreach (apachesolr_load_all_environments() as $id => $environment) {
     $info['apachesolr@' . $id] = array(
       'label' => t('Apache Solr environment: @environment', array('@environment' => $environment['name'])),
@@ -1219,8 +1220,86 @@ function apachesolr_load_all_environments() {
     cache_set('apachesolr:environments', $environments, 'cache_apachesolr');
   }
   return $environments;
+}
+
+ /**
+ * Function that loads all the search types
+ *
+ * @return $search_types
+ */
+function apachesolr_load_all_search_types() {
+  $search_types = &drupal_static(__FUNCTION__);
+
+  if (isset($search_types)) {
+    return $search_types;
+  }
+  // Use cache_get to avoid DB when using memcache, etc.
+  $cache = cache_get('apachesolr:search_types', 'cache_apachesolr');
+  if (isset($cache->data)) {
+    $search_types = $cache->data;
+  }
+  else {
+    $search_types = array(
+        'tid' => array(
+          'name' => apachesolr_field_name_map('tid'),
+          'default menu' => 'taxonomy/term/%',
+          'title callback' => 'apachesolr_get_taxonomy_term_title',
+        ),
+        'is_uid' => array(
+          'name' => apachesolr_field_name_map('is_uid'),
+          'default menu' => 'user/%/search',
+          'title callback' => 'apachesolr_get_user_title',
+        ),
+        'bundle' => array(
+          'name' => apachesolr_field_name_map('bundle'),
+          'default menu' => 'search/type/%',
+          'title callback' => 'apachesolr_get_value_title',
+        ),
+        'ss_language' => array(
+          'name' => apachesolr_field_name_map('ss_language'),
+          'default menu' => 'search/language/%',
+          'title callback' => 'apachesolr_get_value_title',
+        ),
+    );
+    module_invoke_all('apachesolr_search_types', $search_types);
+    cache_set('apachesolr:search_types', $search_types, 'cache_apachesolr');
+  }
+  return $search_types;
+}
+
+function apachesolr_get_taxonomy_term_title($search_page_id = NULL, $value = NULL) {
+   $page_title = 'Search results for %value';
+   if (isset($value) && isset($search_page_id)) {
+     $search_page = apachesolr_search_page_load($search_page_id);
+     $page_title = str_replace('%value', '@value', $search_page->page_title);
+     $term = taxonomy_term_load($value);
+     $title = $term->name;
+   }
+   return t($page_title, array('@value' => $title));
+}
 
- }
+function apachesolr_get_user_title($search_page_id = NULL, $value = NULL) {
+  //add dynamic title posibility
+  $page_title = 'Search results for %value';
+  if (isset($value) && isset($search_page_id)) {
+    $search_page = apachesolr_search_page_load($search_page_id);
+    $page_title = str_replace('%value', '@value', $search_page->page_title);
+    $user = user_load($value);
+    $title = $user->name;
+  }
+  return t($page_title, array('@value' => $title));
+}
+
+function apachesolr_get_value_title($search_page_id = NULL, $value = NULL) {
+  //add dynamic title posibility
+  $page_title = 'Search results for %value';
+  if (isset($value)  && isset($search_page_id)) {
+    $search_page = apachesolr_search_page_load($search_page_id);
+    $page_title = str_replace('%value', '@value', $search_page->page_title);
+    $title = $value;
+  }
+  return t($page_title, array('@value' => $title));
+}
 
 /**
  * Function that loads an environment
@@ -1664,6 +1743,10 @@ function apachesolr_field_name_map($field_name) {
       'tags_inline' => t('Body text in inline tags like EM or STRONG'),
       'tags_a' => t('Body text inside links (A tags)'),
       'tid' => t('Taxonomy term IDs'),
+      'is_uid' => t('User IDs'),
+      'bundle' => t('Content type names eg. article'),
+      'entity_type' => t('Entity type names eg. node'),
+      'ss_language' => t('Language type eg. en or und (undefinded)'),
     );
     if (module_exists('taxonomy')) {
       foreach (taxonomy_get_vocabularies() as $vocab) {
diff --git a/apachesolr_search.admin.inc b/apachesolr_search.admin.inc
index 4c8daae..9aa8857 100644
--- a/apachesolr_search.admin.inc
+++ b/apachesolr_search.admin.inc
@@ -49,7 +49,7 @@ function apachesolr_search_page_list_page() {
 
   // Initializes the search page query.
   $query = db_select('apachesolr_search_page', 's')
-    ->fields('s', array('label', 'page_id', 'page_title', 'description', 'search_path'))
+    ->fields('s', array('label', 'page_id', 'page_title', 'description', 'search_path', 'settings'))
     ->extend('PagerDefault')
     ->extend('TableSort')
     ->limit(20)
@@ -76,9 +76,15 @@ function apachesolr_search_page_list_page() {
 
     $row[] = check_plain($record->env_name);
 
+    $settings = unserialize($record->settings);
     // Operations
     $row[] = array('data' => l(t('Edit'), 'admin/config/search/apachesolr/search-pages/' . $record->page_id . '/edit'));
-    $row[] = array('data' => l(t('Delete'), 'admin/config/search/apachesolr/search-pages/' . $record->page_id . '/delete'));
+    if (!isset($settings['apachesolr_search_not_removable'])) {
+      $row[] = array('data' => l(t('Delete'), 'admin/config/search/apachesolr/search-pages/' . $record->page_id . '/delete'));
+    }
+    else {
+      $row[] = '';
+    }
 
     $rows[] = $row;
   }
@@ -97,8 +103,24 @@ function apachesolr_search_page_list_page() {
  * Menu callback/form-builder for the form to create or edit a search page.
  */
 function apachesolr_search_page_settings_form($form, &$form_state, $search_page = NULL) {
+  $environments = apachesolr_load_all_environments();
+  $options = array('' => t('<Disabled>'));
+  foreach ($environments as $id => $environment) {
+    $options[$id] = $environment['name'];
+  }
+  // Validate the env_id.
+  if (!empty($search_page->env_id) && !apachesolr_environment_load($search_page->env_id)) {
+    $search_page->env_id = '';
+  }
 
   // Initializes form with common settings.
+
+
+  $form['search_page'] = array(
+      '#type' => 'value',
+      '#value' => $search_page,
+  );
+
   $form['label'] = array(
     '#type' => 'textfield',
     '#title' => t('Label'),
@@ -106,8 +128,8 @@ function apachesolr_search_page_settings_form($form, &$form_state, $search_page
     '#required' => TRUE,
     '#size' => 30,
     '#maxlength' => 32,
-    '#weight' => -50,
     '#default_value' => !empty($search_page->label) ? $search_page->label : '',
+    '#description' => t('The human-readable name of the search page configuration.'),
   );
 
   $form['page_id'] = array(
@@ -119,79 +141,130 @@ function apachesolr_search_page_settings_form($form, &$form_state, $search_page
       'source' => array('label'),
     ),
     '#description' => '',
-    '#weight' => -40,
     '#default_value' => !empty($search_page->page_id) ? $search_page->page_id : '',
     '#disabled' => !empty($search_page),
+    '#description' => t('A unique machine-readable identifier for the search page configuration. It must only contain lowercase letters, numbers, and underscores.'),
   );
 
-  $form['info']['description'] = array(
+  $form['description_enable'] = array(
+    '#type' => 'checkbox',
     '#title' => t('Description'),
+  );
+  $form['description'] = array(
     '#type' => 'textfield',
-    '#required' => FALSE,
+    '#title' => t('Provide description'),
+    '#title_display' => 'invisible',
+    '#size' => 64,
+    '#default_value' => !empty($search_page->description) ? $search_page->description : '',
+    '#dependency' => array(
+      'edit-description-enable' => array(1),
+    ),
+  );
+
+  $form['info'] = array(
+    '#title' => t('Search Page Information'),
+    '#type' => 'fieldset',
+    '#collapsible' => FALSE,
+  );
+
+  $form['info']['env_id'] = array(
+    '#title' => t('Search environment'),
+    '#type' => 'select',
+    '#options' => $options,
+    '#default_value' => !empty($search_page->env_id) ? $search_page->env_id : '',
+    '#description' => t('The environment that is used by this search page. If no environment is selected, this page will be disabled.'),
+  );
+  
+  $form['info']['page_title'] = array(
+    '#title' => t('Title'),
+    '#type' => 'textfield',
+    '#required' => TRUE,
     '#maxlength' => 255,
     '#description' => '',
-    '#default_value' => !empty($search_page->description) ? $search_page->description : '',
+    '#default_value' => !empty($search_page->page_title) ? $search_page->page_title : '',
+  );
+
+  $search_types = apachesolr_load_all_search_types();
+  $options = array('custom' => t('Custom Field'));
+  foreach ($search_types as $id => $search_type) {
+    $options[$id] = $search_type['name'];
+  }
+
+  $form['info']['search_type'] = array(
+    '#title' => t('Search Type'),
+    '#type' => 'select',
+    '#options' => $options,
+    '#default_value' => !empty($search_page->settings['apachesolr_search_search_type']) ? $search_page->settings['apachesolr_search_search_type'] : '',
+    '#description' => t('Use this only when using a dynamic filter in the search path.
+      Example you would selecting Taxonomy Term if you search needs a dynamic search path on TIDs (search/taxonomy/%).'),
+    '#ajax' => array(
+      'callback' => 'apachesolr_search_ajax_search_page_default',
+      'wrapper' => 'dynamic-search-page',
+      'method' => 'replace',
+    ),
   );
 
+  // Token element validate is added to validate the specific
+  // tokens that are allowed
   $form['info']['search_path'] = array(
     '#title' => t('Path'),
     '#type' => 'textfield',
     '#required' => TRUE,
     '#maxlength' => 255,
-    '#description' => t('For example: search/my-search-page. Search keywords will appear at the end of the path.'),
+    '#description' => t('For example: search/my-search-page. Search keywords will appear at the end of the path. You can use % to make the search page dynamic.'),
     '#default_value' => !empty($search_page->search_path) ? $search_page->search_path : '',
   );
 
+  $form['info']['custom_filter_enable'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Custom Filter'),
+  );
   $form['info']['filters'] = array(
-    '#title' => t('Default filters'),
+    '#title' => t('Custom filters'),
     '#type' => 'textfield',
     '#required' => FALSE,
     '#maxlength' => 255,
-    '#description' => t('A comma-separated list of lucene filter queries to apply by default. E.g. "bundle:blog, is_uid:(1 OR 2 OR 3)"'),
+    '#description' => t('A comma-separated list of lucene filter queries to apply by default. E.g. "bundle:blog, is_uid:(1 OR 2 OR %). % will be replaced by the value of % in the url"'),
     '#default_value' => !empty($search_page->settings['fq'])  ? implode(', ', $search_page->settings['fq']) : '',
+    '#dependency' => array(
+      'edit-custom-filter-enable' => array(1),
+      'edit-search-type' => array('custom'),
+    ),
   );
 
-  $form['info']['page_title'] = array(
-    '#title' => t('Title'),
-    '#type' => 'textfield',
-    '#required' => TRUE,
-    '#maxlength' => 255,
-    '#description' => '',
-    '#default_value' => !empty($search_page->page_title) ? $search_page->page_title : '',
+  $form['advanced'] = array(
+    '#title' => t('Advanced Search Page Options'),
+    '#type' => 'fieldset',
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
   );
 
-  // Sets the descriptions and button text.
-  $form['label']['#description'] = t('The human-readable name of the search page configuration.');
-  $form['page_id']['#description'] = t('A unique machine-readable identifier for the search page configuration. It must only contain lowercase letters, numbers, and underscores.');
-  $form['info']['description']['#description'] = t('The description of the search page configuration.');
-
-  $environments = apachesolr_load_all_environments();
-
-  $options = array('' => t('<Disabled>'));
-  foreach ($environments as $id => $environment) {
-    $options[$id] = $environment['name'];
-  }
-  // Validate the env_id.
-  if (!empty($search_page->env_id) && !apachesolr_environment_load($search_page->env_id)) {
-    $search_page->env_id = '';
-  }
-
-  $form['info']['env_id'] = array(
-    '#title' => t('Search environment'),
+  // Results per page per search page
+  $default_value = isset($search_page->settings['apachesolr_search_per_page']) ? $search_page->settings['apachesolr_search_per_page'] : '10';
+  $form['advanced']['apachesolr_search_per_page'] = array(
     '#type' => 'select',
-    '#options' => $options,
-    '#default_value' => !empty($search_page->env_id) ? $search_page->env_id : '',
-    '#description' => t('The environment that is used by this search page. If no environment is selected, this page will be disabled.'),
-    '#weight' => -30,
+    '#title' => t('Results per page'),
+    '#description' => t('Select how many items will be displayed on one page of the search result.'),
+    '#options' => drupal_map_assoc(array(5, 10, 20, 30, 40, 50, 60, 80, 100)),
+    '#default_value' => $default_value,
+  );
+
+  // Enable/disable spellcheck on pages
+  $default_value = isset($search_page->settings['apachesolr_search_spellcheck']) ? $search_page->settings['apachesolr_search_spellcheck'] : TRUE;
+  $form['advanced']['apachesolr_search_spellcheck'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Enable spell check'),
+    '#description' => t('Display "Did you mean … ?" above search results.'),
+    '#default_value' => $default_value,
   );
 
   // Use the main search page setting as the default for new pages.
   $default_value = isset($search_page->settings['apachesolr_search_browse']) ? $search_page->settings['apachesolr_search_browse'] : variable_get('apachesolr_search_browse', 'browse');
-  $form['info']['apachesolr_search_browse'] = _apachesolr_search_browse_form($default_value);
+  $form['advanced']['apachesolr_search_browse'] = _apachesolr_search_browse_form($default_value);
 
+  // Button for the corresponding actions
   $form['actions'] = array(
     '#type' => 'actions',
-    '#weight' => 20,
   );
 
   $form['actions']['submit'] = array(
@@ -210,6 +283,35 @@ function apachesolr_search_page_settings_form($form, &$form_state, $search_page
   return $form;
 }
 
+/**
+ * Callback element needs only select the portion of the form to be updated.
+ * Since #ajax['callback'] return can be HTML or a renderable array (or an
+ * array of commands), we can just return a piece of the form.
+ */
+function apachesolr_search_ajax_search_page_default($form, $form_state, $search_page = NULL) {
+
+  $search_page = $form_state['values']['search_page'];
+  $search_types = apachesolr_load_all_search_types();
+
+  // Helping with sensible defaults for the search path
+  $default_search_path = '';
+
+  if (!empty($form_state['values']['search_type']) && $form_state['values']['search_type'] != 'custom') {
+    $default_search_path = $search_types[$form_state['values']['search_type']]['default menu'];
+    $form['setup']['search_path']['#value'] = $default_search_path;
+  }
+
+  // Helping with sensible defaults for the search title
+  $default_search_title = '';
+
+  if (!empty($form_state['values']['page_title']) && $form_state['values']['search_type'] != 'custom') {
+    $default_search_title_callback = $search_types[$form_state['values']['search_type']]['title callback'];
+    $default_search_title = $default_search_title_callback();
+    $form['setup']['page_title']['#value'] = $default_search_title;
+  }
+  return $form['setup'];
+}
+
 function apachesolr_search_page_settings_form_validate($form, &$form_state) {
   // Performs basic validation of the menu path.
   if (url_is_external($form_state['values']['search_path'])) {
@@ -235,25 +337,27 @@ function apachesolr_search_page_settings_form_submit($form, &$form_state) {
       }
     }
   }
-
+  $settings['apachesolr_search_search_type'] = $form_state['values']['search_type'];
+  $settings['apachesolr_search_per_page'] = $form_state['values']['apachesolr_search_per_page'];
   $settings['apachesolr_search_browse'] = $form_state['values']['apachesolr_search_browse'];
+  $settings['apachesolr_search_spellcheck'] = $form_state['values']['apachesolr_search_spellcheck'];
 
-  db_merge('apachesolr_search_page')
-    ->key(array('page_id' => $form_state['values']['page_id']))
-    ->fields(array(
-      'label' => $form_state['values']['label'],
-      'page_id' => $form_state['values']['page_id'],
-      'description' => $form_state['values']['description'],
-      'env_id' => $form_state['values']['env_id'],
-      'search_path' => $form_state['values']['search_path'],
-      'page_title' => $form_state['values']['page_title'],
-      'settings' => serialize($settings),
-    ))
-    ->execute();
+  if (isset($form_state['values']['search_page']->settings)) {
+    $settings = array_merge($form_state['values']['search_page']->settings, $settings);
+  }
+
+  $search_page = new stdClass();
+  $search_page->page_id = $form_state['values']['page_id'];
+  $search_page->label = $form_state['values']['label'];
+  $search_page->description = $form_state['values']['description'];
+  $search_page->env_id = $form_state['values']['env_id'];
+  $search_page->search_path = $form_state['values']['search_path'];
+  $search_page->page_title = $form_state['values']['page_title'];
+  $search_page->settings = $settings;
+  apachesolr_search_page_save($search_page);
 
   // Saves our values in the database, sets redirect path on success.
   drupal_set_message(t('The configuration options have been saved for %page.', array('%page' => $form_state['values']['label'])));
-
   $form_state['redirect'] = 'admin/config/search/apachesolr/search-pages';
 
   // Menu rebuild needed to pick up search path.
@@ -287,7 +391,13 @@ function apachesolr_search_delete_search_page_confirm($form, &$form_state, $sear
   // Finalizes and returns the confirmation form.
   $return_path = 'admin/config/search/apachesolr/search-pages';
   $button_text = t('Delete configuration');
-  return confirm_form($form, $message, $return_path, $caption, $button_text);
+  if (!isset($search_page->settings['apachesolr_search_not_removable'])) {
+    return confirm_form($form, $message, $return_path, $caption, $button_text);
+  }
+  else {
+    // Maybe this should be solved somehow else
+    drupal_access_denied();
+  }
 }
 
 /**
diff --git a/apachesolr_search.install b/apachesolr_search.install
index 6d6a480..0bad312 100644
--- a/apachesolr_search.install
+++ b/apachesolr_search.install
@@ -4,6 +4,13 @@
  * @file
  *   Install and related hooks for apachesolr_search.
  */
+function apachesolr_search_install() {
+  // Run the 7004 update so our default core search page is installed
+  $search_page = apachesolr_search_page_load('core_search');
+  if (empty($search_page)) {
+    apachesolr_search_update_7004();
+  }
+}
 
 /**
  * Implements hook_enable().
@@ -226,3 +233,26 @@ function apachesolr_search_update_7003() {
   db_delete('block')->condition('module', 'apachesolr_search')->execute();
 }
 
+/**
+ * Add a default search page for core
+ */
+function apachesolr_search_update_7004() {
+  // Add Default search page (core search)
+  $settings = array(
+            'apachesolr_search_search_type' => 'custom',
+            'apachesolr_search_per_page' => 10,
+            'apachesolr_search_browse' => 'browse',
+            'apachesolr_search_spellcheck' => 1,
+            'apachesolr_search_not_removable' => 1);
+  $settings = serialize($settings);
+
+  db_insert('apachesolr_search_page')->fields(array(
+        'page_id' => 'core_search',
+        'label' => 'Core Search',
+        'description' => 'Core Search',
+        'search_path' => 'search/site',
+        'env_id' => 'solr',
+        'page_title' => 'Search Results',
+        'settings' => $settings,
+      ))->execute();
+}
\ No newline at end of file
diff --git a/apachesolr_search.module b/apachesolr_search.module
index 0466753..c2a7552 100644
--- a/apachesolr_search.module
+++ b/apachesolr_search.module
@@ -81,12 +81,15 @@ function apachesolr_search_menu() {
     'type'             => MENU_LOCAL_TASK,
     'file'             => 'apachesolr_search.admin.inc',
   );
+  return $items;
+}
 
+function apachesolr_search_menu_alter(&$items) {
   try {
     // Gets search pages directly from the index.
     // @todo Honor "enabled" settings?
     $result = db_select('apachesolr_search_page', 's')
-      ->fields('s', array('page_id', 'search_path', 'page_title', 'env_id'))
+      ->fields('s', array('page_id'))
       ->condition('env_id', '', '<>')
       ->execute();
   }
@@ -97,46 +100,68 @@ function apachesolr_search_menu() {
 
   // Gets default search information.
   $default_info = search_get_default_module_info();
+  $search_types = apachesolr_load_all_search_types();
 
   // Iterates over search pages, builds menu items.
   foreach ($result as $record) {
+    $search_page = apachesolr_search_page_load($record->page_id);
     // Validate the environemnt ID in case of import or missed deletion.
-    $environment = apachesolr_environment_load($record->env_id);
+    $environment = apachesolr_environment_load($search_page->env_id);
     if (!$environment) {
       continue;
     }
+
     // Parses search path into it's various parts, builds menu items dependent
     // on whether %keys is in the path.
-    $parts = explode('/', $record->search_path);
+    $parts = explode('/', $search_page->search_path);
     $keys_pos = count($parts);
     // Tests whether we are simulating a core search tab.
     $core_search = ($parts[0] == 'search');
+    $taxonomy_search = ($search_page->search_path == 'taxonomy/term/%');
+    $position = array_search('%', $parts);
 
-    $items[$record->search_path] = array(
-      'title' => $record->page_title,
+    // Replace possible tokens [term:tid], [node:nid], [user:uid] with their
+    // menu-specific variant
+    $items[$search_page->search_path] = array(
+      'title' => 'Search Results',
       'page callback' => 'apachesolr_search_user_defined_search_page',
-      'page arguments' => array($record->page_id, ''),
+      'page arguments' => array($search_page->page_id, '', $position),
       'access arguments' => array('search content'),
-      'type' => ($core_search) ? MENU_LOCAL_TASK : MENU_SUGGESTED_ITEM,
+      'type' => MENU_SUGGESTED_ITEM,
       'file' => 'apachesolr_search.pages.inc',
+      'file path' => drupal_get_path('module', 'apachesolr_search'),
     );
 
-    $items[$record->search_path . '/%menu_tail'] = array(
-      'title' => $record->page_title,
+    $items[$search_page->search_path . '/%menu_tail'] = array(
+      'title' => 'Search Results',
       'load arguments' => array('%map', '%index'),
       'page callback' => 'apachesolr_search_user_defined_search_page',
-      'page arguments' => array($record->page_id, $keys_pos),
+      'page arguments' => array($search_page->page_id, $keys_pos, $position),
       'access arguments' => array('search content'),
-      'type' => MENU_LOCAL_TASK,
+      'type' => ($taxonomy_search) ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,
       'file' => 'apachesolr_search.pages.inc',
+      'file path' => drupal_get_path('module', 'apachesolr_search'),
     );
+
+    // If title has a certain callback for the selected type we use it
+    if ((isset($search_types[$search_page->settings['apachesolr_search_search_type']]['title callback'])) && (NULL !== $position)) {
+      $title_callback = $search_types[$search_page->settings['apachesolr_search_search_type']]['title callback'];
+      $items[$search_page->search_path]['title callback'] = $title_callback;
+      $items[$search_page->search_path]['title arguments'] = array($search_page->page_id, $position);
+      $items[$search_page->search_path . '/%menu_tail']['title callback'] = $title_callback;
+      $items[$search_page->search_path . '/%menu_tail']['title arguments'] = array($search_page->page_id, $position);
+    }
+
     if ($core_search) {
-      $items[$record->search_path . '/%menu_tail']['tab_root'] = 'search/' . $default_info['path'] . '/%';
-      $items[$record->search_path . '/%menu_tail']['tab_parent'] = 'search/' . $default_info['path'];
+      $items[$search_page->search_path . '/%menu_tail']['tab_root'] = 'search/' . $default_info['path'] . '/%';
+      $items[$search_page->search_path . '/%menu_tail']['tab_parent'] = 'search/' . $default_info['path'];
     }
-  }
 
-  return $items;
+    if ($taxonomy_search) {
+      unset($items['taxonomy/term/%taxonomy_term']);
+      unset($items['taxonomy/term/%taxonomy_term/view']);
+    }
+  }
 }
 
 function apachesolr_search_page_load($page_id) {
@@ -144,7 +169,24 @@ function apachesolr_search_page_load($page_id) {
   if ($page) {
     $page->settings = unserialize($page->settings);
   }
-  return $page; 
+  return $page;
+}
+
+function apachesolr_search_page_save($search_page) {
+  if (!empty($search_page)) {
+    db_merge('apachesolr_search_page')
+      ->key(array('page_id' => $search_page->page_id))
+      ->fields(array(
+        'label' => $search_page->label,
+        'page_id' => $search_page->page_id,
+        'description' => $search_page->description,
+        'env_id' => $search_page->env_id,
+        'search_path' => $search_page->search_path,
+        'page_title' => $search_page->page_title,
+        'settings' => serialize($search_page->settings),
+      ))
+      ->execute();
+  }
 }
 
 /**
@@ -170,11 +212,15 @@ function apachesolr_search_apachesolr_types_exclude($namespace) {
  * Implementation of hook_search_info().
  */
 function apachesolr_search_search_info() {
-  return variable_get('apachesolr_search_search_info', array(
-    'title' => 'Site',
-    'path' => 'site',
-    'conditions_callback' => 'apachesolr_search_conditions',
-  ));
+  // Load our core search page
+  // This core search page is assumingly always there. This cannot be deleted
+  $search_page = apachesolr_search_page_load('core_search');
+  //search.module does not allow a hook not to return something...
+  return array(
+      'title' => $search_page->page_title,
+      'path' => str_replace('search/', '', $search_page->search_path),
+      'conditions callback' => variable_get('apachesolr_search_conditions_callback', 'apachesolr_search_conditions'),
+  );
 }
 
 /**
@@ -367,8 +413,11 @@ function apachesolr_search_run_empty($name, $base_path = '') {
 function apachesolr_search_run($name, array $params = array(), $solrsort = '', $base_path = '', $page = 0, $solr = NULL) {
   // This is the object that knows about the query coming from the user.
   $query = apachesolr_drupal_query($name, $params, $solrsort, $base_path, $solr);
-
   apachesolr_search_basic_params($query);
+
+  //add custom params after we add the default params
+  $query->addParams($params);
+
   apachesolr_search_add_boost_params($query);
   if ($query->getParam('q')) {
     apachesolr_search_highlighting_params($query);
@@ -393,7 +442,6 @@ function apachesolr_search_run($name, array $params = array(), $solrsort = '', $
   }
   list($final_query, $response) = apachesolr_do_query($query, $page);
   apachesolr_has_searched(TRUE);
-
   return apachesolr_search_process_response($response, $final_query);
 }
 
@@ -433,12 +481,26 @@ function apachesolr_search_highlighting_params(DrupalSolrQueryInterface $query =
 
 function apachesolr_search_add_spellcheck_params(DrupalSolrQueryInterface $query) {
   $params = array();
-  if (variable_get('apachesolr_search_spellcheck', TRUE)) {
+
+  $add_spellcheck = TRUE;
+
+  //check earlier spellcheck params
+  $spellchecks = $query->getParam('spellcheck');
+  if (count($spellchecks) > 0) {
+    foreach ($spellchecks as $spellcheck) {
+      //textual false because it is coming from solr
+      if ($spellcheck == 'false') {
+        $add_spellcheck = FALSE;
+      }
+    }
+  }
+
+  if (variable_get('apachesolr_search_spellcheck', TRUE) && $add_spellcheck) {
     //Add new parameter to the search request
     $params['spellcheck.q'] = $query->getParam('q');
     $params['spellcheck'] = 'true';
+    $query->addParams($params);
   }
-  $query->addParams($params);
 }
 
 function apachesolr_search_add_boost_params(DrupalSolrQueryInterface $query) {
@@ -656,7 +718,7 @@ function apachesolr_search_node_result($doc, &$result, &$extra) {
 }
 
 /**
- * Returns whether a search page exists. 
+ * Returns whether a search page exists.
  */
 function apachesolr_search_page_exists($search_page_id) {
   return db_query('SELECT 1 FROM {apachesolr_search_page} WHERE page_id = :page_id', array(':page_id' => $search_page_id))->fetchField();
@@ -714,67 +776,6 @@ function apachesolr_search_apachesolr_environment_delete($server) {
 }
 
 /**
- * Implements hook_form_[form_id]_alter().
- *
- * This adds spelling suggestions, retain filters to the search form.
- */
-function apachesolr_search_form_search_form_alter(&$form, $form_state) {
-  if ($form['module']['#value'] == 'apachesolr_search') {
-    $form['#submit'][] = 'apachesolr_search_form_search_submit';
-    // No other modification make sense unless a query is active.
-    // Note - this means that the query must always be run before
-    // calling drupal_get_form('search_form').
-    $apachesolr_has_searched = apachesolr_has_searched();
-
-    $searcher = NULL;
-    $fq = NULL;
-    if ($apachesolr_has_searched) {
-      $query = apachesolr_current_query();
-      $searcher = $query->getSearcher();
-      // We use the presence of filter query params as a flag for the retain filters checkbox.
-      $fq = $query->getParam('fq');
-    }
-
-    $form['basic']['apachesolr_search']['#tree'] = TRUE;
-    $form['basic']['apachesolr_search']['get'] = array(
-      '#type' => 'hidden',
-      '#default_value' => json_encode(array_diff_key($_GET, array('q' => 1, 'page' => 1, 'solrsort' => 1, 'retain-filters' => 1))),
-    );
-
-    if ($fq || isset($form_state['input']['apachesolr_search']['retain-filters'])) {
-      $form['basic']['apachesolr_search']['retain-filters'] = array(
-        '#type' => 'checkbox',
-        '#title' => t('Retain current filters'),
-        '#default_value' => (int) isset($_GET['retain-filters']),
-      );
-    }
-
-    if (variable_get('apachesolr_search_spellcheck', TRUE) && $apachesolr_has_searched && ($response = apachesolr_static_response_cache($searcher))) {
-      // Get spellchecker suggestions into an array.
-      if (isset($response->spellcheck->suggestions) && $response->spellcheck->suggestions) {
-        $suggestions = get_object_vars($response->spellcheck->suggestions);
-        if ($suggestions) {
-          // Get the original query and replace words.
-
-          foreach ($suggestions as $word => $value) {
-            $replacements[$word] = $value->suggestion[0];
-          }
-          $new_keywords = strtr($query->getParam('q'), $replacements);
-
-          // Show only if suggestion is different than current query.
-          if ($query->getParam('q') != $new_keywords) {
-            $form['apachesolr_search']['suggestion'] = array(
-              '#theme' => 'apachesolr_search_suggestions',
-              '#links' => array(l($new_keywords, $query->getPath($new_keywords))),
-            );
-          }
-        }
-      }
-    }
-  }
-}
-
-/**
  * Default theme function for spelling suggestions.
  */
 function theme_apachesolr_search_suggestions($variables) {
@@ -788,47 +789,6 @@ function theme_apachesolr_search_suggestions($variables) {
 }
 
 /**
- * Added form submit function to retain filters.
- *
- * @see apachesolr_search_form_search_form_alter()
- */
-function apachesolr_search_form_search_submit($form, &$form_state) {
-  $fv = $form_state['values'];
-  $get = json_decode($fv['apachesolr_search']['get'], TRUE);
-  if (!empty($fv['apachesolr_search']['retain-filters'])) {
-    $get['retain-filters'] = '1';
-    // Add the query values into the redirect.
-    $form_state['redirect'] = array($form_state['redirect'], array('query' => $get));
-  }
-}
-
-/**
- * Implements hook_form_[form_id]_alter().
- *
- * This adds options to the apachesolr admin form.
- */
-function apachesolr_search_form_apachesolr_settings_alter(&$form, $form_state) {
-  module_load_include('inc', 'apachesolr_search', 'apachesolr_search.admin');
-  $form['apachesolr_search_browse'] = _apachesolr_search_browse_form(variable_get('apachesolr_search_browse', 'browse'));
-
-  $form['apachesolr_search_spellcheck'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Enable spellchecker and suggestions'),
-    '#default_value' => variable_get('apachesolr_search_spellcheck', TRUE),
-    '#description' => t('Enable spellchecker and get word suggestions. Also known as the "Did you mean ... ?" feature.'),
-  );
-
-  $form['#submit'][] = 'apachesolr_search_build_spellcheck';
-
-  if (isset($form['buttons'])) {
-    // Move buttons to the bottom.
-    $buttons = $form['buttons'];
-    unset($form['buttons']);
-    $form['buttons'] = $buttons;
-  }
-}
-
-/**
  * Implements hook_form_[form_id]_alter().
  *
  * Rebuild (empty) the spellcheck dictionary when the index is deleted..
diff --git a/apachesolr_search.pages.inc b/apachesolr_search.pages.inc
index 4929287..9e501fc 100644
--- a/apachesolr_search.pages.inc
+++ b/apachesolr_search.pages.inc
@@ -1,18 +1,32 @@
 <?php
 
-/**   
+/**
  * @file
  *   Provides the page callback for user defined search pages.
- */ 
+ */
 
 /**
  * Returns search results on user defined search pages.
  */
-function apachesolr_search_user_defined_search_page($page_id, $keys = '') {
+function apachesolr_search_user_defined_search_page($page_id, $keys = '', $value) {
+
   $search_page = apachesolr_search_page_load($page_id);
-  $build = array();
+  $search_type = $search_page->settings['apachesolr_search_search_type'];
+  // Replace dynamic path with current path
+  $search_page->search_path = str_replace('%', $value, $search_page->search_path);
+  //replace the path with the value
+  $search_page->search_path = str_replace('%', $value, $search_page->search_path);
+  //what to do when we have an initial empty search
+  $empty_search_behavior = $search_page->settings['apachesolr_search_browse'];
+
+  // Manual filters
   $filters = isset($search_page->settings['fq']) ? $search_page->settings['fq'] : array();
-  $solrsort = isset($_GET['solrsort']) ? $_GET['solrsort'] : '';
+  // If the manual filter has a % in it, replace it with $value
+  $filters = str_replace('%', $value, $filters);
+  // Set our search type filter
+  if (!empty($search_type) && !empty($value) && $search_type != 'custom') {
+    $filters[] = $search_type . ':' . $value;
+  }
   // We may also have filters added by facet API module. The 'f'
   // is determined by constant FacetapiAdapter::FILTER_KEY. Hard
   // coded here to avoid extra class loading.
@@ -23,27 +37,42 @@ function apachesolr_search_user_defined_search_page($page_id, $keys = '') {
     }
   }
 
-  $empty_search_behavior = $search_page->settings['apachesolr_search_browse'];
+  $solrsort = isset($_GET['solrsort']) ? $_GET['solrsort'] : '';
 
+  $params = array();
   try {
     $solr = apachesolr_get_solr($search_page->env_id);
-    // Adds the search form to the page.
-    $build['search_form'] = drupal_get_form('apachesolr_search_user_defined_search_form', $search_page, $keys);
-
+    //default params
+    $params = array(
+          'fq' => $filters,
+          'rows' => $search_page->settings['apachesolr_search_per_page'],
+    );
+
+    if (!isset($search_page->settings['apachesolr_search_spellcheck']) || !$search_page->settings['apachesolr_search_spellcheck']) {
+       $params['spellcheck'] = 'false';
+    }
+    else {
+      $params['spellcheck'] = 'true';
+    }
+    // Empty text Behavior
     if (!$keys && empty($conditions) && ($empty_search_behavior == 'browse' || $empty_search_behavior == 'blocks')) {
       // Pass empty search behavior as string on to apachesolr_search_search_page()
-      $results = apachesolr_search_run('apachesolr', array('fq' => $filters), '', $search_page->search_path, 0, $solr);
+      $results = apachesolr_search_run('apachesolr', $params, '', $search_page->search_path, 0, $solr);
+
       if ($empty_search_behavior == 'browse') {
         // Hide sidebar blocks for content-area browsing instead.
         apachesolr_suppress_blocks(TRUE);
       }
-
-      $build['search_results'] = apachesolr_search_page_browse($empty_search_behavior);
+      $build_results = apachesolr_search_page_browse($empty_search_behavior);
     }
+    // Full text behavior
     elseif ($keys || !empty($conditions) || $empty_search_behavior == 'results') {
-      $results = apachesolr_search_run('apachesolr', array('q' => $keys, 'fq' => $filters), $solrsort, $search_page->search_path, pager_find_page(), $solr);
+      $params['q'] = $keys;
+
+      $results = apachesolr_search_run('apachesolr', $params, $solrsort, $search_page->search_path, pager_find_page(), $solr);
+
       // Adds search results to the render array.
-      $build['search_results'] = array(
+      $build_results = array(
         '#theme' => 'search_results',
         '#results' => $results,
         '#module' => 'apachesolr_search',
@@ -55,6 +84,13 @@ function apachesolr_search_user_defined_search_page($page_id, $keys = '') {
     apachesolr_failure(t('Solr search'), $keys);
   }
 
+  //initiate our build array
+  $build = array();
+
+  // Adds the search form to the page.
+  $build['search_form'] = drupal_get_form('apachesolr_search_user_defined_search_form', $search_page, $keys);
+  // Adds the search results to the page
+  $build['search_results'] = $build_results;
   return $build;
 }
 
@@ -64,6 +100,9 @@ function apachesolr_search_user_defined_search_page($page_id, $keys = '') {
 function apachesolr_search_user_defined_search_form($form, &$form_state, $search_page, $keys = '') {
   // Loads the core Search CSS file, use the core search module's classes.
   drupal_add_css(drupal_get_path('module', 'search') . '/search.css');
+
+  $form = array();
+
   $form['#id'] = 'search-form';
   $form['#attributes']['class'][] = 'search-form';
 
@@ -73,20 +112,67 @@ function apachesolr_search_user_defined_search_form($form, &$form_state, $search
     '#type' => 'container',
     '#attributes' => array('class' => array('container-inline')),
   );
-
   $form['basic']['keys'] = array(
     '#type' => 'textfield',
-    '#title' => t('Enter terms'), 
+    '#title' => t('Enter terms'),
     '#default_value' => $keys,
     '#size' => 20,
     '#maxlength' => 255,
   );
-
   $form['basic']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Search'),
   );
 
+  //set our solr environment for easy retrieval
+  //TODO: this should be generic and not duplicated
+  $apachesolr_has_searched = apachesolr_has_searched();
+  $query = apachesolr_current_query();
+
+  if ($apachesolr_has_searched) {
+    $query = apachesolr_current_query();
+    $searcher = $query->getSearcher();
+    // We use the presence of filter query params as a flag for the retain filters checkbox.
+    $fq = $query->getParam('fq');
+  }
+
+
+  if ($apachesolr_has_searched && ($response = apachesolr_static_response_cache($searcher))) {
+    $form['basic']['get'] = array(
+      '#type' => 'hidden',
+      '#default_value' => json_encode(array_diff_key($_GET, array('q' => 1, 'page' => 1, 'solrsort' => 1, 'retain-filters' => 1))),
+    );
+
+    if ($fq) {
+      $form['basic']['retain-filters'] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Retain current filters'),
+        '#default_value' => (int) isset($_GET['retain-filters']),
+      );
+    }
+
+    // Get spellchecker suggestions into an array.
+    if (isset($response->spellcheck->suggestions) && $response->spellcheck->suggestions) {
+      $suggestions = get_object_vars($response->spellcheck->suggestions);
+      if ($suggestions) {
+        // Get the original query and replace words.
+
+        foreach ($suggestions as $word => $value) {
+          $replacements[$word] = $value->suggestion[0];
+        }
+        $new_keywords = strtr($query->getParam('q'), $replacements);
+
+        // Show only if suggestion is different than current query.
+        if ($query->getParam('q') != $new_keywords) {
+          $form['suggestion'] = array(
+            '#theme' => 'apachesolr_search_suggestions',
+            '#links' => array(l($new_keywords, $query->getPath($new_keywords))),
+          );
+        }
+      }
+    }
+  }
+
   return $form;
 }
 
@@ -94,13 +180,22 @@ function apachesolr_search_user_defined_search_form($form, &$form_state, $search
  * Processes apachesolr_search_user_defined_search_form submissions.
  */
 function apachesolr_search_user_defined_search_form_submit(&$form, &$form_state) {
-  $page = $form['#search_page'];
-
-  $redirect = $page->search_path;
+  $search_page = $form['#search_page'];
+  $redirect = $search_page->search_path;
   if (strlen($form_state['values']['keys'])) {
     $redirect .= '/' . $form_state['values']['keys'];
   }
 
-  // Redirects to path set in configuration.
-  $form_state['redirect'] = $redirect;
+  $get = json_decode($form_state['values']['get'], TRUE);
+
+  if (!empty($form_state['values']['retain-filters'])) {
+    //add our saved value
+    $get['retain-filters'] = '1';
+    // Add the query values into the redirect.
+    $form_state['redirect'] = array($redirect, array('query' => $get));
+  }
+  else {
+    // Redirects to path set in configuration.
+    $form_state['redirect'] = $redirect;
+  }
 }
diff --git a/contrib/apachesolr_taxonomy.info b/contrib/apachesolr_taxonomy.info
deleted file mode 100644
index a7bab24..0000000
--- a/contrib/apachesolr_taxonomy.info
+++ /dev/null
@@ -1,8 +0,0 @@
-name = Apache Solr Taxonomy
-description = Override handling of taxonomy/term/X links using Solr search. Deprecated in favor of Views integration.
-dependencies[] = taxonomy
-dependencies[] = apachesolr_search
-package = Search Toolkit
-core = 7.x
-
-files[] = apachesolr_taxonomy.module
diff --git a/contrib/apachesolr_taxonomy.module b/contrib/apachesolr_taxonomy.module
deleted file mode 100644
index 2dd4ef7..0000000
--- a/contrib/apachesolr_taxonomy.module
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-
-/**
- * @file
- *   Override handling of taxonomy/term/X links.
- *   Deprecated in favor of Views integration.
- */
-
- /**
- * Implements hook_menu_alter().
- */
-function apachesolr_taxonomy_menu_alter(&$menu) {
-  if (isset($menu['taxonomy/term/%taxonomy_term'])) {
-    $menu['taxonomy/term/%taxonomy_term']['page callback'] = 'apachesolr_taxonomy_term_page';
-    $menu['taxonomy/term/%taxonomy_term']['file path'] = NULL;
-    $menu['taxonomy/term/%taxonomy_term']['file'] = NULL;
-  }
-}
-
-/**
- * Overrides taxonomy/term/X links
- */
-//function apachesolr_search_taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
-function apachesolr_taxonomy_term_page($term) {
-  // Build breadcrumb based on the hierarchy of the term.
-  $current = clone $term;
-  // @todo This overrides any other possible breadcrumb and is a pure hard-coded
-  // presumption. Make this behavior configurable per vocabulary or term.
-  $breadcrumb = array();
-  while ($parents = taxonomy_get_parents($current->tid)) {
-    $current = array_shift($parents);
-    $breadcrumb[] = l($current->name, 'taxonomy/term/' . $current->tid);
-  }
-  $breadcrumb[] = l(t('Home'), NULL);
-  $breadcrumb = array_reverse($breadcrumb);
-  drupal_set_breadcrumb($breadcrumb);
-  drupal_add_feed(url('taxonomy/term/' . $term->tid . '/feed'), 'RSS - ' . $term->name);
-
-  $build = array();
-  // Add term heading if the term has a description
-  if (!empty($term->description)) {
-    $build['term_heading'] = array(
-      '#prefix' => '<div class="term-listing-heading">',
-      '#suffix' => '</div>',
-      'term' => taxonomy_term_view($term, 'full'),
-    );
-  }
-
-  if (user_access('search content')) {
-    $_GET['retain-filters'] = 1; // Encourages the user to keep the taxonomy filter on next search.
-    $results = apachesolr_search_run('', array('tid:' . $term->tid), variable_get('apachesolr_search_taxonomy_sort', 'ds_created desc'), 'search/apachesolr_search', isset($_GET['page']) ? $_GET['page'] : 0);
-
-    if ($results) {
-      foreach ($results as $entry) {
-        $output[] = $entry;
-      }
-      $build['content'] = array(
-        '#markup' => theme('search_results', array(
-          'results' => $output,
-          'module' => 'apachesolr_search',
-        )),
-      );
-      return $build;
-    }
-  }
-
-  $build['no_content'] = array(
-    '#prefix' => '<p>',
-    '#markup' => t('There is currently no content classified with this term.'),
-    '#suffix' => '</p>',
-  );
-  return $build;
-}
-
diff --git a/plugins/facetapi/adapter.inc b/plugins/facetapi/adapter.inc
index 59ef80f..bcd6df3 100644
--- a/plugins/facetapi/adapter.inc
+++ b/plugins/facetapi/adapter.inc
@@ -73,6 +73,33 @@ class ApacheSolrFacetapiAdapter extends FacetapiAdapter {
   }
 
   /**
+   * Returns the search path.
+   *
+   * @return string
+   *   A string containing the search path.
+   *
+   * @todo D8 should provide an API function for this.
+   */
+  public function getSearchPath() {
+    $query = apachesolr_current_query();
+    if (NULL === $this->searchPath && NULL === $query->getPath()) {
+      if ($path = module_invoke($this->info['module'] . '_search', 'search_info')) {
+        $this->searchPath = 'search/' . $path['path'];
+        if (!isset($_GET['keys']) && ($keys = $this->getSearchKeys())) {
+          $this->searchPath .= '/' . $keys;
+        }
+      }
+    }
+    if (NULL === $query->getPath()) {
+       return $this->searchPath;
+    }
+    else {
+      return $query->getPath();
+    }
+
+  }
+
+  /**
    * Returns the nmber of total results found for the current search.
    */
   public function getResultCount() {
@@ -88,4 +115,5 @@ class ApacheSolrFacetapiAdapter extends FacetapiAdapter {
   public function settingsForm(&$form, &$form_state) {
     $form['#validate'][] = 'apachesolr_facet_form_validate';
   }
+
 }
