I replaced the hub and bearings and that fixed the loud noise during the spin cycle as well as the F51 error code. I noticed that motor stator housing was cracked in a few places while replacing the hub but didn't have a replacement at the time so I continued to use the washer with the cracked one. The washer was still noisy during the wash cycle as the agitator spun back and forth. Even though the washer was working better than before, I decided to replace the motor stator since it was cracked and there was still some noise during operation. The noise is still there after replacing the motor stator so now I'm ordering replacement basket hub parts in case they are slipping during operation and causing that sound. The old ones appeared to be in good condition though. I hope the basket hub parts fixes the final noise problem as I'll have just about replaced everything in that area that would cause it. The use of a cordless driver made the screw and nut removal/replacement go a lot quicker.