More work on battle loop