Split when/wait into its own headers