diff --git a/R/common.R b/R/common.R
new file mode 100644
index 0000000..15ac425
--- /dev/null
+++ b/R/common.R
@@ -0,0 +1,102 @@
+library(RKorAPClient)
+library(httr)
+library(httpuv)
+library(tidyverse)
+library(scales)
+library(idsThemeR)
+library(kableExtra)
+library(DT)
+
+icc_base_url = "https://korap.ids-mannheim.de/instance/icc";
+
+connections = list()
+
+icc <- tibble(
+  lang = c("eng", "ger", "nor"),
+  app_id = c(
+    "mTTTnJ6f6hGrPh6dRhbJhJ",
+    "TMLPTJfP7rHb93bpFp39mL",
+    "TMFtPJnbb7f4MRmd76Rb34"
+  )
+)
+
+
+icc_token <- function(lang,  app_id, url = paste0(icc_base_url, '/', lang)) {
+  token_key =  paste0("KORAP_ICC_TOKEN_", lang)
+  token = Sys.getenv(token_key)
+  if (token != "")
+    return(token)
+
+  korap_app <- oauth_app("icc-iclc10-contribution", key = app_id, secret = NULL)
+
+  korap_endpoint <- oauth_endpoint(NULL,
+                                   "settings/oauth/authorize",
+                                   "api/v1.0/oauth2/token",
+                                   base_url = url)
+  token_bundle = oauth2.0_token(korap_endpoint, korap_app, scope = "search match_info", cache = T)
+  token = token_bundle[["credentials"]][["access_token"]]
+  do.call(Sys.setenv, as.list(setNames(token, token_key)))
+  return(token)
+}
+
+icc_con <- function(lang, token = Sys.getenv(paste0("KORAP_ICC_TOKEN_", lang))) {
+  if ((! lang %in% names(connections)) || is_empty(connections[[lang]])) {
+    url <- paste0(icc_base_url, '/', lang)
+    connections[[lang]] <<- new("KorAPConnection", KorAPUrl = url, accessToken = token, cache = T)
+  }
+  return(connections[[lang]])
+}
+
+icc <- icc %>%
+  rowwise() %>%
+  mutate(token = icc_token(lang, app_id))
+
+genre <- c("Blog",
+             "Creative:Novels_ShortStories",
+             "Informational:Learned:Humanities",
+             "Informational:Learned:NaturalSciences",
+             "Informational:Learned:SocialSciences",
+             "Informational:Learned:Technology",
+             "Informational:Popular:Humanities",
+             "Informational:Popular:NaturalSciences",
+             "Informational:Popular:SocialSciences",
+             "Informational:Popular:Technology",
+             "Informational:Reportage",
+             "Instructional:AdministrativeRegulatoryProse",
+             "Instructional:Skills_Hobbies",
+             "Persuasive"
+)
+
+wordsFromQuery <- function (query) {
+  v <- str_split(query, "([! )(\uc2\uab,.:?\u201e\u201c\'\"]+|&quot;)") %>% unlist() %>%  unique()
+  v <- v[str_detect(v, '^[:alnum:]+-?[:alnum:]*$')]
+  v[order(nchar(v), v, decreasing = T)]
+}
+
+highliteSubstrings <- function (string, substrings) {
+  what = paste0('(', paste0(substrings, collapse="|"), ')')
+  with = '<b>\\1</b>'
+  str_replace_all(string, what, with)
+}
+
+deleteFillers <- function (string) {
+  string %>%
+    str_replace_all('</b> +<b>', ' ') %>%
+    str_replace_all('</b>[^<]+<b>', ' ... ') %>%
+    str_replace_all('^[^<]*<b>', '') %>%
+    str_replace_all('</b>[^<]*$', '')
+
+}
+
+show_table <- function(df) {
+  df %>%
+    mutate(Collocate=sprintf('<a href="%s">%s</a>', webUIRequestUrl, collocate)) %>%
+    rowwise() %>%
+    mutate(Example=highliteSubstrings(example, wordsFromQuery(query))) %>%
+    select(Collocate, Example, logDice, pmi, ll) %>%
+    head(50) %>%
+    datatable(escape = F) %>%
+    formatRound(columns=~logDice + pmi + ll, digits=2)
+}
+
+
diff --git a/R/icc_stats.R b/R/icc_stats.R
index 9d8f4a1..f7bdda6 100644
--- a/R/icc_stats.R
+++ b/R/icc_stats.R
@@ -1,69 +1,4 @@
-library(RKorAPClient)
-library(httr)
-library(httpuv)
-library(tidyverse)
-library(scales)
-library(idsThemeR)
-
-icc_base_url = "https://korap.ids-mannheim.de/instance/icc";
-
-connections = list()
-
-icc <- tibble(
-  lang = c("eng", "ger", "nor"),
-  app_id = c(
-    "mTTTnJ6f6hGrPh6dRhbJhJ",
-    "TMLPTJfP7rHb93bpFp39mL",
-    "TMFtPJnbb7f4MRmd76Rb34"
-  )
-)
-
-
-icc_token <- function(lang,  app_id, url = paste0(icc_base_url, '/', lang)) {
-  token_key =  paste0("KORAP_ICC_TOKEN_", lang)
-  token = Sys.getenv(token_key)
-  if (token != "")
-    return(token)
-
-  korap_app <- oauth_app("icc-iclc10-contribution", key = app_id, secret = NULL)
-
-  korap_endpoint <- oauth_endpoint(NULL,
-                                   "settings/oauth/authorize",
-                                   "api/v1.0/oauth2/token",
-                                   base_url = url)
-  token_bundle = oauth2.0_token(korap_endpoint, korap_app, scope = "search match_info", cache = FALSE)
-  token = token_bundle[["credentials"]][["access_token"]]
-  do.call(Sys.setenv, as.list(setNames(token, token_key)))
-  return(token)
-}
-
-icc_con <- function(lang, token = Sys.getenv(paste0("KORAP_ICC_TOKEN_", lang))) {
-  if ((! lang %in% names(connections)) || is_empty(connections[[lang]])) {
-    url <- paste0(icc_base_url, '/', lang)
-    connections[[lang]] <<- new("KorAPConnection", KorAPUrl = url, accessToken = token, cache = F)
-  }
-  return(connections[[lang]])
-}
-
-icc <- icc %>%
-  rowwise() %>%
-  mutate(token = icc_token(lang, app_id))
-
-genre <- c("Blog",
-             "Creative:Novels_ShortStories",
-             "Informational:Learned:Humanities",
-             "Informational:Learned:NaturalSciences",
-             "Informational:Learned:SocialSciences",
-             "Informational:Learned:Technology",
-             "Informational:Popular:Humanities",
-             "Informational:Popular:NaturalSciences",
-             "Informational:Popular:SocialSciences",
-             "Informational:Popular:Technology",
-             "Informational:Reportage",
-             "Instructional:AdministrativeRegulatoryProse",
-             "Instructional:Skills_Hobbies",
-             "Persuasive"
-)
+source("R/common.R")
 
 icc_genre <- icc %>%
   expand_grid(genre) %>%
