Portland Tug25, we changed the batteries on our R31 (2014) a week ago. The original batteries were 5 ½ years old and losing their capacity. We selected Concorde Lifeline AGM 31XT batteries to replace the original batteries. These batteries have the same group 31 footprint of the original Universal batteries that came with the boat but have a 125 amp hour rating versus the 110 of the Universals. This increased our total battery bank to 500 amp hrs over the original 440 amp hrs. The Lifeline batteries do have the disadvantage of having posts instead of vertical tabs. That meant I had to reroute the cables to a horizontal arrangement instead of the vertical orientation of the OEM batteries. I wish Lifeline made the tab style on the group 31 like they do on their 4D and 8D batteries.
Here are some things I do to try and minimize the time and problems associated with changing the batteries on the R31.
Prep Work
Here is a photo of our original battery bank:

Note that the positive leads (red) are on the “outside” part of the batteries while the negatives are on the “inside” of the batteries (yellow). We set up the new batteries on the deck so that their orientation looks just like the original installation.
I also tape my wrenches since I don’t have insulated wrenches. I try to limit the possibility of touching a negative and positive post which can cause a fire or explosion. I also remove my ring as well. A LED headlight is useful so that you don't have to use a flashlight.
Removal
After turning off DC and AC circuits, turning off the inverter, and turning off the shore power at the power post, I start removing the positive leads first. On our boat, the Magnum inverter requires that if the positive lead is connected it must first have a negative lead attached.
As I remove the positive cables I take a cable tie and tie the cables together and label each set so I know which battery they came from. For example, we labeled right front, left front, left rear and right rear. We used red and yellow electrical tape (we bought these rolls at Home Depot), red for the positive and yellow for the negatives. We tape the end of the exposed cable so that other leads would not inadvertently touch other cables. See this photo of the taped cables.
After removing all of the positive leads we removed all of the negative leads. We then removed all of the batteries. The battery trays supplied by Ranger Tugs work well. I removed the hold down straps. I found through prior trial and error that the batteries don’t have to be lifted out of the tray, in fact doing so in this small space is a difficult task. There is enough play in the tray that the battery can be tilted and then you can slide the battery out of the tray and remove it from the lazarette. Here is a photo of the battery being tilted out of the tray.
Once all of the old batteries are out, I cleaned the trays and placed the new batteries in the trays. The straps are re-attached and the cables attached to the posts on the new batteries. Again, the negative cables are all attached first and then the positive cables. The positive terminals are then covered with the red insulators. The power is restored and the inverter restarted. Check your inverter manual as to how they stipulate you should shut down and restart your inverter after replacing the batteries. If you have any hesitancy about doing this yourself it may be worth it to have a professional shop do the installation for you. Hope this is helpful in your battery replacement task!