The episode was Gareth Roberts' first writing credit proper on the show, however he had written for Doctor Who many times before.
The scene in which the Doctor and Martha share a room was originally written to have the Doctor casually undress down to his underwear; and still obliviously invite Martha to share the bed.