Scripted: Some cleanups + ninja changes