recognitionintentservice rewrite and cleanup