When Alex and The Doctor are in the kitchen they open and close the fridge as they are talking. This was not in the script, but improvised by Matt Smith and Daniel Mays on set.
It was found that the Peg Dolls were appropriately creepy while stationary, but were less effective as they moved silently through the dollhouse. After initially suggesting that the monsters be accompanied by a menacing giggle, Steven Moffat instead proposed that they should be heard to recite a sinister nursery rhyme in children's voices. Mark Gatiss agreed to craft an appropriate lyric, which would allude to the Doctor's apparent death. Moffat was so pleased with the result that he decided to omit dialogue originally spoken by the Peg Dolls in the voices of Mrs Rossiter and Purcell. Instead, only Fern Duncan and Frances Encell's contribution would be heard; the nursery rhyme also became a recurring motif in subsequent episodes.
The Doctor emphasises his age frequently in the episode, this is a thematic contrast with the core ideas of childhood fears and the toy imagery.
As a child, Mark Gatiss had been unnerved by toys and costumes which only roughly approximated the human form. He had a particular loathing for Victorian-era china dolls. This inspired the Peg Dolls as the monsters of the piece.