Refactor: isValidTag removed, toInternalTag added