Add loss record to 'update_win_loss_record' function and syntax fixes.