Refactored battle state and observer so that almost all code is within battle state.