First draft of the core script