Start to rationalise API, some script fixes and new editor layout