Moved code from battle test to battle activity