Refactoring some tag recommendation funcitons. Adding script to update tag recommendation data