New scripts and tidying up