Refactor tag service

Pass basic smoke test