205 decoupling learning material crud

Fixes #205
This is a lot going on for a one liner maybe 
if ((!empty($value) && !in_array($value, $meshTermsFinal))) {
  $meshTermsFinal[] = $value;
}
or even 
$meshTerms = array_unique ( $meshTerms);
$meshTermsFinal =  array_filter ( $meshTerms );