The song sung by Locke's men is 'The Bear and the Maiden Fair', a ribald song popular in Westeros about a hairy bear that, while going to a fair with a band of three boys and a goat, rescues a maiden who was hoping for a knight. The rock cover of the song during the end credits that abruptly follows on Jaime losing his hand was a deliberate choice by showrunners David Benioff and D.B. Weiss, to create a shocking transition and keep the audience off balance (and because they didn't think they could ask composer Ramin Djawadi for a "Jaime-gets-his-hand-chopped-off music").
Historically, the Walk of Punishment is based on the aftermath of the slave rebellion by Spartacus against the Roman Empire. After Spartacus's defeat in battle against Crassus and Pompey, 6,000 surviving rebels (all former slaves) were crucified along the length of the Appian Way from Capua to Rome.
Dean-Charles Chapman, the actor who appears as Martyn Lannister at Riverrun, was later cast as Tommen in Season 4.
During her conversation with Missandei, Daenerys quotes what a slave said to her on the Walk of Punishment, which the slave likely would have said in Low Valyrian, the language of Astapor. This combined with her translating the phrase spoken by Missandei, 'Valar morghulis', subtly foreshadows the revelation in the next episode, that Daenerys has understood Low Valyrian the entire time.
Podrick was aged up for the show, because in the books, he is about 12 years old when he squires for Tyrion; his reward for bravery with prostitutes only happens in the series. After the show ended, many fans half-jokingly stated that one of the series' biggest unresolved mysteries was what Podrick did to the prostitutes that they would forgo their payment.
Gary Lightbody: the lead singer of Snow Patrol makes an appearance as the Bolton soldier singing 'The Bear and the Maiden Fair' as they ride.