Add battle layer, update several functions.