Refactored to make tag based subscription more robust.