Though only Cyril Hume and Richard Maibaum are credited for the screenplay, the shooting script was entirely re-worked by director Nicholas Ray and star/producer James Mason, who added the first 20 minutes of the film depicting Ed Avery's daily life before being hospitalized. Re-writes by Ray, his friend Gavin Lambert (who at that time was living together with Ray, recently confessing that they were actually lovers) and Clifford Odets went on all through the shooting process.