Backport few useful changes from previewbuildscript branch