Rewrote the scaffolding script