Do some refactoring to prepare for resolving battle attacks better