 The episode was written by James Moran , who previously wrote the film Severance and the Torchwood episode " Sleeper " ; Moran was requested to write the episode as a consequence of the latter . Moran had difficulty writing the episode , and had to rewrite the Doctor 's opening line over twenty times . The Pyrovile were also edited during writing : they were previously called Pyrovillaxians and Pyrovellians . 
