Added activity removed functionality