Refactor Tag lookup