Fixed up code to more closely resemble Combat Tag code