"Cabin in the Woods" is getting raves from critics and moviegoers alike, but the most interesting thing about it isn’t the surprise “twist,” but the twists of the plot itself. What follows is a structural breakdown of the entire movie (SPOILER ALERT) and tips on how to keep your own complicated script under control.

Though Halloween is over, horror is having a great afterlife. Scary movies are premiering year-round, and high-quality TV shows like The Walking Dead and American Horror Story are terrifying audiences and wowing execs with stellar production values and great acting (Jessica Lange, anyone?) In honor of terror, here are the top tips for writing a horror screenplay.