public function urlify($handle, $max_length = null, $locale = '', $removeExcludedWords = true)
    {
        if ($max_length === null) {
            $max_length = Config::get('concrete.seo.segment_max_length');
        }
        $text = strtolower(str_replace(array("\r", "\n", "\t"), ' ', $this->asciify($handle, $locale)));
        if ($removeExcludedWords) {
            $excludeSeoWords = Config::get('concrete.seo.exclude_words');
            if (is_string($excludeSeoWords)) {
                if (strlen($excludeSeoWords)) {
                    $remove_list = explode(',', $excludeSeoWords);
                    $remove_list = array_map('trim', $remove_list);
                    $remove_list = array_filter($remove_list, 'strlen');
                } else {
                    $remove_list = array();
                }
            } else {
                $remove_list = URLify::$remove_list;
            }
            if (count($remove_list)) {
                $text = preg_replace('/\b(' . implode('|', $remove_list) . ')\b/i', '', $text);
            }
        }
        $text = preg_replace('/[^-\w\s]/', '', $text);   // remove unneeded chars
        $text = str_replace('_', ' ', $text);            // treat underscores as spaces
        $text = preg_replace('/^\s+|\s+$/', '', $text);  // trim leading/trailing spaces
        $text = preg_replace('/[-\s]+/', '-', $text);    // convert spaces to hyphens
        $text = strtolower($text);                       // convert to lowercase
        return trim(substr($text, 0, $max_length), '-'); // trim to first $maxlength chars
    }