Merged begin and keyword logic in tag addon