Wire length

is is legal to make the wires attached to the battery shorter (the wires on that plastic connector)

Yes, this is legal.

Our team has been trying to optimize battery wire length for years. I suggest you make them no longer than you have to. The voltage (V) drop on these wires add up, so it is always good to keep that resistance ® down to a minimum.

Andy B.