Diamondbacks beat struggling Marlins 5-1