The cables that hold the mast are called shrouds... the fittings that attach them to the chainplates are designed to articulate but the chainplates themselves (the strips that attach to the bulkheads and pass through the deck) should not be moving or rotating.... you should check this out carefully as solid chainplates are essential to the safety and security of the rig..
See here :
Last Penny - Upper Chain Plate Reinforcement
As for the battery, I would chisel out that rotted wood and epoxy a new piece in : (cover the entire piece of wood first with epoxy to keep out the water - on second thoughts, just use Starboard as that won't rot), then install a battery box... they have them at Defender and car part stores and they only cost $20 or less. The brackets for the box should screw into the Starboard.